Skip to content

Commit

Permalink
Remove optional dependencies after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Feb 21, 2024
1 parent a927c3c commit df95629
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"prebuild-win32": "prebuildify-platform-packages --debug --target 20.0.0 && prebuildify-platform-packages --debug --target 18.17.1 && set ENABLE_V8_FUNCTIONS=false&& prebuildify-platform-packages --debug --napi --platform-packages --target 18.17.1",
"prebuild-libc-arm7": "ENABLE_V8_FUNCTIONS=false prebuildify-platform-packages --debug --napi --platform-packages --tag-libc --target 18.17.1",
"prebuildify": "prebuildify-platform-packages --debug --napi --target 18.17.1",
"full-publish": "cd prebuilds/win32-x64 && npm publish --tag next --access public && cd ../darwin-x64 && npm publish --tag next --access public && cd ../darwin-arm64 && npm publish --tag next --access public && cd ../linux-x64 && npm publish --tag next --access public && cd ../linux-arm64 && npm publish --tag next --access public && cd ../linux-arm && npm publish --tag next --access public && cd ../.. && npm publish --tag next",
"full-publish": "cd prebuilds/win32-x64 && npm publish --tag next --access public && cd ../darwin-x64 && npm publish --tag next --access public && cd ../darwin-arm64 && npm publish --tag next --access public && cd ../linux-x64 && npm publish --tag next --access public && cd ../linux-arm64 && npm publish --tag next --access public && cd ../linux-arm && npm publish --tag next --access public && cd ../.. && npm publish --tag next && node util/remove-optional-deps.cjs",
"recompile": "node-gyp clean && node-gyp configure && node-gyp build",
"test": "mocha test/**.test.js --expose-gc --recursive",
"deno-test": "deno run --allow-ffi --allow-write --allow-read --allow-env --allow-net --unstable test/deno.ts",
Expand Down
4 changes: 4 additions & 0 deletions util/remove-optional-deps.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let fs = require('fs');
packageData = JSON.parse(fs.readFileSync('package.json'));
packageData.optionalDependencies = {}; // clear optionalDependencies
fs.writeFileSync('package.json', JSON.stringify(packageData, null, 2));

0 comments on commit df95629

Please sign in to comment.