Skip to content

Commit

Permalink
update generate license file library (#1649)
Browse files Browse the repository at this point in the history
- update to use the new version of generate-license-file, which exclude current repo's license in the third-party-notices file

- the fallback option for restoring cache when running circleci build may cause problem when the restored cache doesn't match with the current package.json (e.g. previously stored cache may contain a repo like test-react-component library which this pr and develop branch doesn't have, this causes failure when attempting to write/check access of node_modules in [npm install step in circleci](https://app.circleci.com/pipelines/github/yext/answers-search-ui/7133/workflows/94d880bd-09ee-4a75-86b7-d12dc2b70a03/jobs/25962)), this pr also remove that fallback option
J=SLAP-1754
TEST=manual

ran `npm run generate-notices` with the new version, and see that repo's license is not in the third-party-notices file
  • Loading branch information
yen-tt authored Jan 10, 2022
1 parent 1a61288 commit cb55006
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ commands:
- restore_cache:
keys:
- v3-node-14-{{ checksum "package-lock.json" }}
# fallback to use the latest cache from the same node version if no exact match is found
- v3-node-14-
- run: npm install
- save_cache:
paths:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/third_party_notices_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
- run: npm install -g generate-license-file
- uses: actions/checkout@v2
- run: npm ci
- run: generate-license-file --input package.json --output ./THIRD-PARTY-NOTICES
- run: npm run generate-notices
- name: Update THIRD-PARTY-NOTICES
uses: EndBug/add-and-commit@v7
with:
Expand Down
7 changes: 3 additions & 4 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-----------

The following NPM packages may be included in this product:
The following NPM package may be included in this product:

- @yext/answers-search-ui@1.12.0
- @yext/answers-storage@1.1.0

These packages each contain the following license and notice below:
This package contains the following license and notice below:

BSD 3-Clause License

Expand Down Expand Up @@ -8465,4 +8464,4 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

-----------

This file was generated with generate-license-file! https://www.npmjs.com/package/generate-license-file
This file was generated with generate-license-file! https://www.npmjs.com/package/generate-license-file
24 changes: 11 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"eslint-plugin-promise": "^5.1.0",
"fs-extra": "^9.0.1",
"full-icu": "^1.3.4",
"generate-license-file": "^1.2.0",
"generate-license-file": "^1.3.0",
"gettext-extractor": "^3.5.2",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
Expand Down Expand Up @@ -127,7 +127,7 @@
"preinstall": "npx npm-force-resolutions",
"prepublishOnly": "npm run build-languages && npm run generate-entry-points && ./conf/npm/use_npm_readme.sh",
"postpublish": "./conf/npm/revert_npm_readme.sh",
"generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES",
"generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite",
"generate-entry-points": "./conf/npm/generateentrypoints.js package.json"
},
"resolutions": {
Expand Down Expand Up @@ -241,4 +241,4 @@
"./zh-Hant/modern.min": "./dist/zh-Hant-answers-modern.min.js",
"./zh-Hant/template": "./dist/zh-Hant-answerstemplates.compiled.min.js"
}
}
}

0 comments on commit cb55006

Please sign in to comment.