From 31c9281cb530a9e9e26854ce7f7d434a9219c64b Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Mon, 22 Apr 2024 17:56:37 -0300 Subject: [PATCH 1/2] add lib-font credits and license in source code --- packages/edit-site/lib/inflate.js | 30 ++++++++++++++ packages/edit-site/lib/lib-font.browser.js | 30 ++++++++++++++ packages/edit-site/lib/unbrotli.js | 47 +++++++++++++++++----- 3 files changed, 97 insertions(+), 10 deletions(-) diff --git a/packages/edit-site/lib/inflate.js b/packages/edit-site/lib/inflate.js index 6455f401137f78..a80bc507e0db7b 100644 --- a/packages/edit-site/lib/inflate.js +++ b/packages/edit-site/lib/inflate.js @@ -1,3 +1,33 @@ +/** + * Credits: + * + * lib-font + * https://github.com/Pomax/lib-font + * https://github.com/Pomax/lib-font/blob/master/lib/inflate.js + * + * The MIT License (MIT) + * + * Copyright (c) 2020 pomax@nihongoresources.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + /* eslint eslint-comments/no-unlimited-disable: 0 */ /* eslint-disable */ /* pako 1.0.10 nodeca/pako */ ( function ( f ) { diff --git a/packages/edit-site/lib/lib-font.browser.js b/packages/edit-site/lib/lib-font.browser.js index 6d16f0e195e882..db5be2088a3447 100644 --- a/packages/edit-site/lib/lib-font.browser.js +++ b/packages/edit-site/lib/lib-font.browser.js @@ -1,3 +1,33 @@ +/** + * Credits: + * + * lib-font + * https://github.com/Pomax/lib-font + * https://github.com/Pomax/lib-font/blob/master/lib-font.browser.js + * + * The MIT License (MIT) + * + * Copyright (c) 2020 pomax@nihongoresources.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + /* eslint eslint-comments/no-unlimited-disable: 0 */ /* eslint-disable */ // import pako from 'pako'; diff --git a/packages/edit-site/lib/unbrotli.js b/packages/edit-site/lib/unbrotli.js index 74d14ded17dfee..14190cb221b517 100644 --- a/packages/edit-site/lib/unbrotli.js +++ b/packages/edit-site/lib/unbrotli.js @@ -1,3 +1,33 @@ +/** + * Credits: + * + * lib-font + * https://github.com/Pomax/lib-font + * https://github.com/Pomax/lib-font/blob/master/lib/unbrotli.js + * + * The MIT License (MIT) + * + * Copyright (c) 2020 pomax@nihongoresources.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + /* eslint eslint-comments/no-unlimited-disable: 0 */ /* eslint-disable */ ( function ( f ) { @@ -332,12 +362,11 @@ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, /* UTF8 lead byte range. */ + 1, 0, 1, 0, 1, 0, 1 /* UTF8 lead byte range. */, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, - 3, 2, 3, 2, 3, 2, 3, - /* CONTEXT_UTF8 second last byte. */ + 3, 2, 3, 2, 3, /* CONTEXT_UTF8 second last byte. */ /* ASCII range. */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, @@ -351,11 +380,10 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, /* UTF8 lead byte range. */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, + 0, 0, 0, 0 /* UTF8 lead byte range. */, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - /* CONTEXT_SIGNED, second last byte. */ + 2, 2, 2, 2, 2, /* CONTEXT_SIGNED, second last byte. */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -447,9 +475,8 @@ exports.lookupOffsets = new Uint16Array( [ /* CONTEXT_LSB6 */ - 1024, 1536, /* CONTEXT_MSB6 */ - 1280, 1536, /* CONTEXT_UTF8 */ - 0, 256, /* CONTEXT_SIGNED */ + 1024, 1536 /* CONTEXT_MSB6 */, 1280, + 1536 /* CONTEXT_UTF8 */, 0, 256 /* CONTEXT_SIGNED */, 768, 512, ] ); }, From 5c80898199fa8c24e7cab989d33b661eab15b74a Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Mon, 22 Apr 2024 18:20:39 -0300 Subject: [PATCH 2/2] undo js lint --- packages/edit-site/lib/unbrotli.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/edit-site/lib/unbrotli.js b/packages/edit-site/lib/unbrotli.js index 14190cb221b517..1555c591a6d157 100644 --- a/packages/edit-site/lib/unbrotli.js +++ b/packages/edit-site/lib/unbrotli.js @@ -362,11 +362,12 @@ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1 /* UTF8 lead byte range. */, 2, 3, + 1, 0, 1, 0, 1, 0, 1, /* UTF8 lead byte range. */ 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, - 3, 2, 3, 2, 3, /* CONTEXT_UTF8 second last byte. */ + 3, 2, 3, 2, 3, 2, 3, + /* CONTEXT_UTF8 second last byte. */ /* ASCII range. */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, @@ -380,10 +381,11 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0 /* UTF8 lead byte range. */, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, /* UTF8 lead byte range. */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, /* CONTEXT_SIGNED, second last byte. */ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + /* CONTEXT_SIGNED, second last byte. */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -475,8 +477,9 @@ exports.lookupOffsets = new Uint16Array( [ /* CONTEXT_LSB6 */ - 1024, 1536 /* CONTEXT_MSB6 */, 1280, - 1536 /* CONTEXT_UTF8 */, 0, 256 /* CONTEXT_SIGNED */, + 1024, 1536, /* CONTEXT_MSB6 */ + 1280, 1536, /* CONTEXT_UTF8 */ + 0, 256, /* CONTEXT_SIGNED */ 768, 512, ] ); },