Skip to content

Commit

Permalink
fix: Ship to NPM without node version restrictions (shaka-project#5253)
Browse files Browse the repository at this point in the history
Before packaging for NPM, remove the "engines" section of package.json
to avoid unnecessary restrictions on node versions for projects that
simply depend on Shaka Player, but don't need to rebuild it. This is
accomplished with the clean-package tool:
https://github.com/roydukkey/clean-package

The "engines" section and its restrictions still make sense for Shaka
Player development, so it will not be removed from package.json in the
repo.

Closes shaka-project#5243
  • Loading branch information
joeyparrish committed Jun 1, 2023
1 parent 03b39f7 commit 524a80b
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions .npmignore
Expand Up @@ -3,6 +3,7 @@
.gitattributes
.gitignore
.release-please*
*.backup
*.pyc
app-engine/
build/
Expand Down
61 changes: 61 additions & 0 deletions package-lock.json

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

8 changes: 8 additions & 0 deletions package.json
Expand Up @@ -18,6 +18,7 @@
"awesomplete": "^1.1.5",
"babel-plugin-istanbul": "^6.1.1",
"cajon": "^0.4.4",
"clean-package": "^2.2.0",
"code-prettify": "^0.1.0",
"codem-isoboxer": "^0.3.7",
"color-themes-for-google-code-prettify": "^2.0.4",
Expand Down Expand Up @@ -96,12 +97,19 @@
},
"license": "Apache-2.0",
"scripts": {
"prepack": "clean-package",
"postpack": "clean-package restore",
"prepublishOnly": "python build/checkversion.py && python build/all.py --force"
},
"dependencies": {
"eme-encryption-scheme-polyfill": "^2.1.1"
},
"engines": {
"node": ">=14"
},
"clean-package": {
"remove": [
"engines"
]
}
}

0 comments on commit 524a80b

Please sign in to comment.