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 92306e1
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 10,609 deletions.
24 changes: 12 additions & 12 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 All @@ -89,23 +89,23 @@ jobs:
name: SpiderMonkey 68
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
- 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-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
2 changes: 1 addition & 1 deletion build/reproducible-builds.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function buildRelease (version, cacheDir = null) {
npm_config_update_notifier: 'false',
PATH: process.env.PATH,
QUNIT_BUILD_RELEASE: '1',
PUPPETEER_DOWNLOAD_PATH: path.join(cacheDir, 'puppeteer_download')
PUPPETEER_CACHE_DIR: path.join(cacheDir, 'puppeteer_download')
};
// Use sync for npm-ci to avoid concurrency bugs with shared cache
cp.execFileSync('npm', ['ci'], {
Expand Down
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');
}
});
2 changes: 1 addition & 1 deletion demos/grunt-contrib-qunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ QUnit.test.each('failing tests', {
>> at file:fail-uncaught.html:16`]
}, (assert, [command, expected]) => {
try {
// This will use env CI, CHROMIUM_FLAGS, and PUPPETEER_DOWNLOAD_PATH
// This will use env CI, CHROMIUM_FLAGS, and PUPPETEER_CACHE_DIR
const ret = cp.execSync('node_modules/.bin/grunt qunit:' + command, {
cwd: DIR,
encoding: 'utf8'
Expand Down
Loading

0 comments on commit 92306e1

Please sign in to comment.