Skip to content

Commit

Permalink
Use for '--ignore-scripts' for all npm ci & npm install
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Dec 4, 2021
1 parent ce4277e commit 0f7b090
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Lint ESLint
run: npm run lint
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Run npm install
run: npm install --engine-strict --strict-peer-deps
run: npm install --ignore-scripts --engine-strict --strict-peer-deps

- name: Check that package-lock.json is in sync with package.json
run: git diff --exit-code package-lock.json
Expand All @@ -85,7 +85,7 @@ jobs:
# so we skip cache action to not pollute cache for other jobs.

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Run Integration Tests
run: npm run check:integrations
Expand All @@ -104,7 +104,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Run Tests
run: npm run fuzzonly
Expand All @@ -123,7 +123,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Run tests and measure code coverage
run: npm run testonly:cover
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
node-version: ${{ matrix.node_version_to_setup }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Run Tests
run: npm run testonly
Expand All @@ -173,7 +173,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Run Benchmark
run: 'npm run benchmark -- --revs HEAD HEAD~1'
Expand All @@ -194,7 +194,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Generate report
run: 'node resources/diff-npm-package.js $BASE_COMMIT HEAD'
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Build NPM package
run: npm run build:npm
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: Build Deno package
run: npm run build:deno
Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark.js
Expand Up @@ -58,7 +58,7 @@ function prepareBenchmarkProjects(revisionList) {
path.join(projectPath, 'package.json'),
'{ "private": true }',
);
exec('npm --quiet install ' + prepareNPMPackage(revision), {
exec('npm --quiet install --ignore-scripts ' + prepareNPMPackage(revision), {
cwd: projectPath,
});
exec(`cp -R ${localDir('benchmark')} ${projectPath}`);
Expand Down Expand Up @@ -86,7 +86,7 @@ function prepareBenchmarkProjects(revisionList) {
fs.rmSync(repoDir, { recursive: true, force: true });
fs.mkdirSync(repoDir);
exec(`git archive "${hash}" | tar -xC "${repoDir}"`);
exec('npm --quiet ci', { cwd: repoDir });
exec('npm --quiet ci --ignore-scripts', { cwd: repoDir });
fs.renameSync(buildNPMArchive(repoDir), archivePath);
fs.rmSync(repoDir, { recursive: true });
return archivePath;
Expand Down
2 changes: 1 addition & 1 deletion integrationTests/integration-test.js
Expand Up @@ -37,7 +37,7 @@ describe('Integration Tests', () => {
exec(`cp -R ${projectPath} ${tmpDir}`);

const cwd = path.join(tmpDir, projectName);
exec('npm --quiet install', { cwd, stdio: 'inherit' });
exec('npm --quiet install --ignore-scripts', { cwd, stdio: 'inherit' });
exec('npm --quiet test', { cwd, stdio: 'inherit' });
}).timeout(60000);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -30,7 +30,7 @@
"node": "^12.22.0 || ^14.16.0 || >=16.0.0"
},
"scripts": {
"preversion": ". ./resources/checkgit.sh && npm ci",
"preversion": ". ./resources/checkgit.sh && npm ci --ignore-scripts",
"version": "node resources/gen-version.js && npm test && git add src/version.ts",
"fuzzonly": "mocha --full-trace src/**/__tests__/**/*-fuzz.ts",
"changelog": "node resources/gen-changelog.js",
Expand Down
2 changes: 1 addition & 1 deletion resources/diff-npm-package.js
Expand Up @@ -89,7 +89,7 @@ function prepareNPMPackage(revision) {
fs.rmSync(repoDir, { recursive: true, force: true });
fs.mkdirSync(repoDir);
exec(`git archive "${hash}" | tar -xC "${repoDir}"`);
exec('npm --quiet ci', { cwd: repoDir });
exec('npm --quiet ci --ignore-scripts', { cwd: repoDir });
exec('npm --quiet run build:npm', { cwd: repoDir });
return path.join(repoDir, 'npmDist');
}
Expand Down

0 comments on commit 0f7b090

Please sign in to comment.