This is an automated email from the ASF dual-hosted git repository. shanedell pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git
The following commit(s) were added to refs/heads/main by this push: new dc12ff6 Add CI jobs for node LICENSEs. Add missing LICENESEs. dc12ff6 is described below commit dc12ff6523e86847bcc1dcc9e8b1b5c31a91eed7 Author: Shane Dell <shanedell...@gmail.com> AuthorDate: Mon Jun 9 10:59:46 2025 -0400 Add CI jobs for node LICENSEs. Add missing LICENESEs. - Add workflow job that check to see if a dependency's LICENSE is missing. - Add workflow job to check all node dependencies license compatibility. Closes https://github.com/apache/daffodil-vscode/issues/1291 --- .github/workflows/CI.yml | 36 --- .github/workflows/{CI.yml => licenes.yml} | 120 +++----- build/license_data.json | 42 +++ build/package/LICENSE | 436 ++++++++++++++++++++++++++++++ build/package/NONOTICE | 5 + build/yarn-scripts.ts | 95 +++++++ package.json | 2 + project/Rat.scala | 1 + 8 files changed, 612 insertions(+), 125 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c9b1d18..a8d1fd4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -89,42 +89,6 @@ jobs: - name: TypeScript lint run: yarn lint - rat-check: - name: Rat Check - strategy: - matrix: - java_distribution: [temurin] - java_version: [8] - os: [ubuntu-22.04] - runs-on: ${{ matrix.os }} - defaults: - run: - shell: bash - env: - SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m -J-XX:MaxMetaspaceSize=1024m ++2.12.15 - steps: - ############################################################ - # Setup - ############################################################ - - - name: Check out Repository - uses: actions/checkout@v4.2.2 - with: - fetch-depth: 0 - - - name: Setup Java - uses: actions/setup-java@v4.7.0 - with: - distribution: ${{ matrix.java_distribution }} - java-version: ${{ matrix.java_version }} - - ############################################################ - # Rat check - ############################################################ - - - name: Run Rat Check - run: $SBT ratCheck || (cat target/rat.txt; exit 1) - build-test-package: name: "Build, Test, and Package (OS: ${{ matrix.os }}, Node: ${{ matrix.node }}, Java: ${{ matrix.java_version }}, VS Code: ${{ matrix.vscode }})" strategy: diff --git a/.github/workflows/CI.yml b/.github/workflows/licenes.yml similarity index 54% copy from .github/workflows/CI.yml copy to .github/workflows/licenes.yml index c9b1d18..55be52e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/licenes.yml @@ -14,7 +14,7 @@ # limitations under the License. --- -name: CI +name: LICENES CI on: push: branches-ignore: ["dependabot/**"] @@ -22,32 +22,13 @@ on: types: [opened, synchronize, reopened] jobs: - single-commit: - name: Single Commit Pull Request - if: github.event_name == 'pull_request' - runs-on: ubuntu-22.04 - steps: - - name: Check Single Commit - uses: actions/github-script@v7.0.1 - with: - script: | - const commits = await github.rest.pulls.listCommits({ - ...context.repo, - pull_number: context.issue.number, - }); - core.info("Number of commits in this pull request: " + commits.data.length); - if (commits.data.length > 1) { - core.setFailed("If approved with two +1's, squash this pull request into one commit"); - } - - code-format: - name: TypeScript/Scala/Svelte Formatting + rat-check: + name: Rat Check strategy: matrix: java_distribution: [temurin] java_version: [8] os: [ubuntu-22.04] - node: ["20"] runs-on: ${{ matrix.os }} defaults: run: @@ -61,6 +42,8 @@ jobs: - name: Check out Repository uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 - name: Setup Java uses: actions/setup-java@v4.7.0 @@ -68,40 +51,23 @@ jobs: distribution: ${{ matrix.java_distribution }} java-version: ${{ matrix.java_version }} - - name: Install Node.js - uses: actions/setup-node@v4.2.0 - with: - node-version: ${{ matrix.node }} - ############################################################ - # Lint/format checks + # Rat check ############################################################ - - name: Scala format check - run: $SBT scalafmtCheck - - - name: Scala sbt format check - run: $SBT scalafmtSbtCheck - - - name: Install node dependencies - run: yarn install - - - name: TypeScript lint - run: yarn lint + - name: Run Rat Check + run: $SBT ratCheck || (cat target/rat.txt; exit 1) - rat-check: - name: Rat Check + node-missing-license-data-check: + name: Node Missing LICENSE Data Check strategy: matrix: - java_distribution: [temurin] - java_version: [8] os: [ubuntu-22.04] + node: ["22.14.0"] runs-on: ${{ matrix.os }} defaults: run: shell: bash - env: - SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m -J-XX:MaxMetaspaceSize=1024m ++2.12.15 steps: ############################################################ # Setup @@ -112,35 +78,31 @@ jobs: with: fetch-depth: 0 - - name: Setup Java - uses: actions/setup-java@v4.7.0 + - name: Install Node.js + uses: actions/setup-node@v4.2.0 with: - distribution: ${{ matrix.java_distribution }} - java-version: ${{ matrix.java_version }} + node-version: ${{ matrix.node }} + + - name: Install dependencies + run: yarn install ############################################################ - # Rat check + # Node Missing LICENSE Data Check ############################################################ - - name: Run Rat Check - run: $SBT ratCheck || (cat target/rat.txt; exit 1) + - name: Run Node Missing LICENSE Data Check + run: yarn check-missing-license-data - build-test-package: - name: "Build, Test, and Package (OS: ${{ matrix.os }}, Node: ${{ matrix.node }}, Java: ${{ matrix.java_version }}, VS Code: ${{ matrix.vscode }})" + node-license-compatibility: + name: Node LICENSE Compatibility Check strategy: matrix: - java_distribution: [temurin] - java_version: [8, 11, 17] - os: [macos-13, ubuntu-22.04, windows-2019] - node: ["20.18.3", "22.14.0"] - vscode: ["1.90.0", "stable"] # v1.90.0 is the first version of VSCode to use Node 20 - fail-fast: false # don't immediately fail all other jobs if a single job fails + os: [ubuntu-22.04] + node: ["22.14.0"] runs-on: ${{ matrix.os }} defaults: run: shell: bash - env: - DAFFODIL_TEST_VSCODE_VERSION: ${{ matrix.vscode }} steps: ############################################################ # Setup @@ -148,40 +110,20 @@ jobs: - name: Check out Repository uses: actions/checkout@v4.2.2 - - - name: Setup Java - uses: actions/setup-java@v4.7.0 with: - distribution: ${{ matrix.java_distribution }} - java-version: ${{ matrix.java_version }} - - # some runner oses don't have sbt by default - - name: Setup sbt - uses: sbt/setup-sbt@v1 + fetch-depth: 0 - name: Install Node.js uses: actions/setup-node@v4.2.0 with: node-version: ${{ matrix.node }} + + - name: Install dependencies + run: yarn install ############################################################ - # Build & Package + # Node LICENSE Compatibility Check ############################################################ - - name: Install node dependencies - run: yarn install - - - name: Runs tests - Linux - run: xvfb-run -a yarn test - if: runner.os == 'Linux' - - - name: Runs tests - Windows/Mac - run: yarn test - if: runner.os != 'Linux' - - - name: Check for Errors in macOS - run: tail -n 1000 '/Users/runner/Library/Application Support/omega_edit/'* && exit 1 - if: failure() && runner.os == 'macOS' - - - name: Package - run: yarn package + - name: Run Node LICENSE Compatibility Check + run: yarn check-license-compatibility diff --git a/build/license_data.json b/build/license_data.json new file mode 100644 index 0000000..cfd756d --- /dev/null +++ b/build/license_data.json @@ -0,0 +1,42 @@ +{ + "allowedLiceneseTypes": [ + "Apache-2.0", + "Apache-1.1", + "PHP-3.01", + "BSD-2-Clause", + "BSD-3-Clause", + "DOM4J", + "PostgreSQL", + "BSD-3-Clause-LBNL", + "MIT", + "ISC", + "CUP", + "MIT-0", + "ICU", + "NCSA", + "W3C-20150513", + "Xnet", + "Zlib", + "FSF", + "Bitstream-Vera", + "AFL-3.0", + "MS-PL", + "PSF-2.0", + "PIL", + "APAFML", + "BSL-1.0", + "WTFPL", + "ZPL-2.0", + "ACE", + "MulanPSL-2.0", + "0BSD", + "TCL" + ], + "packages": [ + { + "name": "buffers", + "license": "MIT", + "allowed": true + } + ] +} diff --git a/build/package/LICENSE b/build/package/LICENSE index 86ad597..1eb2180 100644 --- a/build/package/LICENSE +++ b/build/package/LICENSE @@ -4039,3 +4039,439 @@ conditions of the following licenses. 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. + +- '@js-sdsl/ordered-map' in extension/dist/ext/extension.js + This produce bundles '@js-sdsl/ordered-map' from the above files + These files are available under the MIT License: + + MIT License + + Copyright (c) 2021 Zilong Yao + + 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. + +- '@microsoft/fast-element' in extension/dist/ext/extension.js +- '@microsoft/fast-foundation' in extension/dist/ext/extension.js +- '@microsoft/fast-react-wrapper' in extension/dist/ext/extension.js +- '@microsoft/fast-web-utilities' in extension/dist/ext/extension.js + This produce bundles '@js-sdsl/ordered-map' from the above files + These files are available under the MIT License: + + FAST - https://www.fast.design/ + + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + 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 + +- '@vscode/webview-ui-toolkit' in extension/dist/ext/extension.js + This produce bundles '@vscode/webview-ui-toolkit' from the above files + These files are available under the MIT License: + + Copyright (c) Microsoft Corporation. + + MIT License + + 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. + +- 'cross-spawn' in extension/dist/ext/extension.js + This produce bundles 'cross-spawn' from the above files + These files are available under the MIT License: + + The MIT License (MIT) + + Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio> + + 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. + +- 'execa' in extension/dist/ext/extension.js + This produce bundles 'execa' from the above files + These files are available under the MIT License: + + MIT License + + Copyright (c) Sindre Sorhus <sindresor...@gmail.com> (https://sindresorhus.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. + +- 'exenv-es6' in extension/dist/ext/extension.js + This produce bundles 'exenv-es6' from the above files + These files are available under the MIT License: + + MIT License + + Copyright (c) 2018 Chris Holt + + 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. + +- 'get-stream' in extension/dist/ext/extension.js +- 'is-stream' in extension/dist/ext/extension.js +- 'mimic-fn' in extension/dist/ext/extension.js +- 'npm-run-path' in extension/dist/ext/extension.js +- 'onetime' in extension/dist/ext/extension.js +- 'path-key' in extension/dist/ext/extension.js +- 'pid-port' in extension/dist/ext/extension.js +- 'pid-port' in @omega-edit/client +- 'shebang-regex' in extension/dist/ext/extension.js +- 'strip-final-newline' in extension/dist/ext/extension.js + This produce bundles 'get-stream', 'is-stream', 'mimic-fn', 'npm-run-path', 'onetime', 'path-key', 'pid-port', 'shebang-regex', 'strip-final-newline' from the above files + These files are available under the MIT License: + + MIT License + + Copyright (c) Sindre Sorhus <sindresor...@gmail.com> (https://sindresorhus.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. + +- 'iso-639-1eam' in extension/dist/ext/extension.js + This produce bundles 'iso-639-1' from the above files + These files are available under the MIT License: + + This software is licensed under the MIT License. + + Copyright(c) by Mei Qingguang + + 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. + +- 'merge-stream' in extension/dist/ext/extension.js + This produce bundles 'merge-stream' from the above files + These files are available under the MIT License: + + The MIT License (MIT) + + Copyright (c) 2013 Stephen Sugden <m...@stephensugden.com> (stephensugden.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. + +- 'shebang-command' in extension/dist/ext/extension.js + This produce bundles 'shebang-command' from the above files + These files are available under the MIT License: + + MIT License + + Copyright (c) Kevin MÃ¥rtensson <kevinmartens...@gmail.com> (github.com/kevva) + + 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. + +- 'tabbable' in extension/dist/ext/extension.js + This produce bundles 'tabbable' from the above files + These files are available under the MIT License: + + The MIT License (MIT) + + Copyright (c) 2015 David Clark + + 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. + +- 'undici-types' in extension/dist/ext/extension.js + This produce bundles 'undici-types' from the above files + These files are available under the MIT License: + + MIT License + + Copyright (c) Matteo Collina and Undici contributors + + 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. + +- 'xml-parser-xo' in extension/dist/ext/extension.js + This produce bundles 'xml-parser-xo' from the above files + These files are available under the MIT License: + + The MIT License (MIT) + + Copyright 2020 Chris Bottin (https://github.com/chrisbottin) + + 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. + +- 'isexe' in extension/dist/ext/extension.js + This produce bundles 'isexe' from the above files + These files are available under the ISC License: + + The ISC License + + Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +- 'sax-js' in extension/dist/ext/extension.js + This produce bundles 'sax-js' from the above files + These files are available under the ISC License: + + The ISC License + + Copyright (c) 2010-2024 Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ==== + + `String.fromCodePoint` by Mathias Bynens used according to terms of MIT + License, as follows: + + Copyright (c) 2010-2024 Mathias Bynens <https://mathiasbynens.be/> + + 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. + +- 'signal-exit' in extension/dist/ext/extension.js + This produce bundles 'signal-exit' from the above files + These files are available under the ISC License: + + The ISC License + + Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice + appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE + LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES + OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +- 'tslib' in extension/dist/ext/extension.js + This produce bundles 'tslib' from the above files + These files are available under the BSD Zero Clause License License: + + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + +- 'node-which' in extension/dist/ext/extension.js + This produce bundles 'node-which' from the above files + These files are available under the ISC License: + + The ISC License + + Copyright (c) Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/build/package/NONOTICE b/build/package/NONOTICE index 7d6c638..9af6ec0 100644 --- a/build/package/NONOTICE +++ b/build/package/NONOTICE @@ -22,6 +22,11 @@ The following binary components distributed with this project are licensed under This package is available under the Apache License v2 without a NOTICE: Repository at: https://github.com/grpc/grpc-node +- 'human-signals' in extension/dist/ext/extension.js + This product bundles 'human-signals' from the above files. + This package is available under the Apache License v2 without a NOTICE: + Repository at: https://github.com/ehmicky/human-signals + - 'long' in extension/dist/ext/extension.js - 'long' in node_modules/@omega-edit/client This product bundles 'long' from the above files. diff --git a/build/yarn-scripts.ts b/build/yarn-scripts.ts index 2c8709e..24ec6a1 100644 --- a/build/yarn-scripts.ts +++ b/build/yarn-scripts.ts @@ -21,6 +21,7 @@ const path = require('path') const fs = require('fs') const glob = require('glob') const concurrently = require('concurrently') +const child_process = require('child_process') function rmFileOrDirectory(path) { if (fs.existsSync(path)) fs.rmSync(path, { recursive: true }) @@ -176,6 +177,98 @@ function updateVersion() { } /* END SECTION: Update version */ +/* START SECTION: LICENSE related methods */ +function getLicenseData() { + return JSON.parse( + child_process + .execSync( + `yarn licenses list --json --prod | jq 'select(.type == "table").data.body'` + ) + .toString() + ) +} + +function checkMissingLicenseData() { + const licenses = getLicenseData() + + const packageLicenseData = fs.readFileSync('build/package/LICENSE', 'utf-8') + const packageLicenseLines = packageLicenseData.split('\n') + + const packageNoticeData = fs.readFileSync('build/package/NOTICE', 'utf-8') + const packageNoticeLines = packageNoticeData.split('\n') + + const packageNoNoticeData = fs.readFileSync('build/package/NONOTICE', 'utf-8') + const packageNoNoticeLines = packageNoNoticeData.split('\n') + + const missingLicenseData = [] + + licenses.forEach((license) => { + if ( + packageLicenseLines + .map((line) => line.startsWith('-') && line.includes(license[0])) + .some(Boolean) || + packageNoticeLines + .map((line) => line.startsWith('-') && line.includes(license[0])) + .some(Boolean) || + packageNoNoticeLines + .map((line) => line.startsWith('-') && line.includes(license[0])) + .some(Boolean) + ) + return + + missingLicenseData.push(license[0]) + }) + + if (missingLicenseData.length > 0) { + console.log('Missing LICENSE data for the following dependencies') + missingLicenseData.forEach((licenseName) => + console.log(` - ${licenseName}`) + ) + process.exit(1) + } else { + console.log('No missing LICENSE data!') + } +} + +function checkLicenseCompatibility() { + const licenses = getLicenseData() + + const licenseDataFileData = JSON.parse( + fs.readFileSync('build/license_data.json', 'utf-8') + ) + + const allowedLicenseTypes = licenseDataFileData.allowedLiceneseTypes + const allowedLicenses = licenseDataFileData.packages + .filter((data) => data.allowed) + .map((data) => data.name) + + const badLicenses = [] + + licenses.forEach((license) => { + const licenseCompatibile = + allowedLicenseTypes.filter((licenseType) => + license[2].includes(licenseType) + ).length > 0 + ? true + : false + + if (!licenseCompatibile && !allowedLicenses.includes(license[0])) { + badLicenses.push(license) + } + }) + + if (badLicenses.length > 0) { + console.log('The follow dependencies have not ASF approved LICENCES:') + badLicenses.forEach((license) => + console.log(` - ${license[0]} -> ${license[2]}`) + ) + process.exit(1) + } else { + console.log('All dependency LICENSES are compatibile!') + } +} +/* END SECTION: LICENSE related methods */ + module.exports = { genVersionTS: genVersionTS, nodeclean: nodeclean, @@ -183,4 +276,6 @@ module.exports = { updateVersion: updateVersion, watch: watch, package: package, + checkMissingLicenseData: checkMissingLicenseData, + checkLicenseCompatibility: checkLicenseCompatibility, } diff --git a/package.json b/package.json index fff8aa3..df52071 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,8 @@ "gen-version-ts": "run-func build/yarn-scripts.ts genVersionTS", "nodeclean": "run-func build/yarn-scripts.ts nodeclean", "scalaclean": "run-func build/yarn-scripts.ts scalaclean", + "check-missing-license-data": "run-func build/yarn-scripts.ts checkMissingLicenseData", + "check-license-compatibility": "run-func build/yarn-scripts.ts checkLicenseCompatibility", "clean": "yarn nodeclean && yarn scalaclean", "precompile": "yarn nodeclean && yarn gen-version-ts && yarn webpack:svelte && yarn compile:tdmlEditorJS", "compile": "tsc -p ./ && yarn sbt", diff --git a/project/Rat.scala b/project/Rat.scala index b4eaa9a..2c66ebb 100644 --- a/project/Rat.scala +++ b/project/Rat.scala @@ -40,6 +40,7 @@ object Rat { file("svelte/package.json"), file(".prettierrc"), file("svelte/.prettierrc"), + file("build/license_data.json"), // ignore images - daffiodil.ico file("images/daffodil.ico"), // yarn and rpm generated files