Skip to content

Commit

Permalink
Build: Remove package-lock.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Sep 13, 2024
1 parent bf42d2b commit 3ec14bd
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 10,606 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
FORCE_COLOR: "1"
steps:
- uses: actions/checkout@v4
Expand All @@ -62,14 +62,14 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- run: npm ci
- run: npm install

- name: Tests
run: ${{ matrix.script }}
Expand Down Expand Up @@ -97,15 +97,15 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install mozjs
run: |
sudo apt-fast install -y libmozjs-68-dev
- run: npm ci
- run: npm install
- run: npm run build
- name: Test mozjs.js
run: js68 test/mozjs.js
Expand All @@ -127,23 +127,23 @@ jobs:
name: SpiderMonkey 102
runs-on: ubuntu-24.04
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install mozjs
run: |
sudo apt-get install -y libmozjs-102-dev
- run: npm ci
- run: npm install
- run: npm run build
- name: Test mozjs.js
run: js102 test/mozjs.js
Expand All @@ -165,23 +165,23 @@ jobs:
name: SpiderMonkey 115
runs-on: ubuntu-24.04
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install mozjs
run: |
sudo apt-get install -y libmozjs-115-dev
- run: npm ci
- run: npm install
- run: npm run build
- name: Test mozjs.js
run: js115 test/mozjs.js
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/browsers-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
runs-on: ubuntu-latest
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4

Expand All @@ -26,7 +26,7 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v4
Expand All @@ -35,7 +35,7 @@ jobs:

- name: Prepare
run: |
npm ci
npm install
npm run build
- name: Tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/browsers-quick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
runs-on: ubuntu-latest
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4

Expand All @@ -17,7 +17,7 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v4
Expand All @@ -26,7 +26,7 @@ jobs:

- name: Prepare
run: |
npm ci
npm install
npm run build
# To debug locally:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: ${{ github.repository == 'qunitjs/qunit' }} # skip on forks, needs secret
runs-on: ubuntu-20.04
env:
PUPPETEER_DOWNLOAD_PATH: "${{ github.workspace }}/.puppeteer_download"
PUPPETEER_CACHE_DIR: "${{ github.workspace }}/.puppeteer_download"
steps:
- uses: actions/checkout@v4

Expand All @@ -17,14 +17,14 @@ jobs:
path: |
~/.npm
${{ github.workspace }}/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18.x

- run: npm ci
- run: npm install

- name: Tests
run: npm run coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
/qunit/
/temp/
/.eslintcache
/package-lock.json
16 changes: 10 additions & 6 deletions demos/bundlers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,14 @@ Testing http://localhost:8000/tmp/test-require-sub.webpack.html .OK
Done.`;

const actual = cp.execSync('node_modules/.bin/grunt test', {
cwd: DIR,
env: { PATH: process.env.PATH },
encoding: 'utf8'
});
assert.equal(normalize(actual).trim(), expected);
try {
const actual = cp.execSync('node_modules/.bin/grunt test', {
cwd: DIR,
env: { PATH: process.env.PATH },
encoding: 'utf8'
});
assert.equal(normalize(actual).trim(), expected);
} catch (e) {
assert.equal(e.stdout || e.stderr, '', 'error');
}
});
Loading

0 comments on commit 3ec14bd

Please sign in to comment.