Skip to content

Commit

Permalink
Use npmignore instead of package.json#files
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 28, 2023
1 parent 2e6cd13 commit 719959b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,29 @@ jobs:
# TODO: move this to its own action
npm install @npmcli/arborist@7 semver@7 --no-save
node .github/scripts/check-engines.js
Pack_Test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Update npm
run: npm install npm@latest -g
- name: Install Dependencies
run: npm install --no-progress
- name: Pack
run: |
DIR=${{ runner.temp }}/node-gyp
mkdir -p $DIR
npm pack
tar xzf *.tgz -C $DIR --strip-components=1
cp -r test/ $DIR/test/
- name: Test
run: npm test
working-directory: ${{ runner.temp }}/node-gyp
Tests:
needs: Lint_Python # Lint_Python takes ~5 seconds, so wait for it to pass before running the full matrix of tests.
strategy:
Expand Down
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/.github/
/docs/
/gyp/.github/
/gyp/tools/
/gyp/*.md
/gyp/AUTHORS
/test/
*.tgz
14 changes: 0 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@
"preferGlobal": true,
"bin": "./bin/node-gyp.js",
"main": "./lib/node-gyp.js",
"files": [
"/bin/",
"!/gyp/",
"/gyp/data/",
"/gyp/pylib/",
"/gyp/gyp",
"/gyp/gyp_main.py",
"/gyp.bat",
"/gyp/gyp",
"/lib/",
"/src/",
"/addon.gypi",
"macOS_Cataline_acid_test.sh"
],
"dependencies": {
"env-paths": "^2.2.0",
"exponential-backoff": "^3.1.1",
Expand Down

0 comments on commit 719959b

Please sign in to comment.