From 5805a107745b86229a8aa0c3e7da8fb618ce79dd Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 23 May 2022 22:08:16 +0300 Subject: [PATCH] Revert "chore(npm scripts): don't build on installing dependencies" This reverts commit 2099ea5b33571aa3761b24e444b87feb57936b47. --- .github/workflows/main.yml | 2 +- docs/hooks.py | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 20442bdb83..b76d025cb1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: ~/.npm ~/.autorest key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - - run: npm ci + - run: npm ci --ignore-scripts - name: Run Commitlint env: EVENT_TYPE: ${{ github.event_name }} diff --git a/docs/hooks.py b/docs/hooks.py index eb8ada2b64..c49b40318b 100644 --- a/docs/hooks.py +++ b/docs/hooks.py @@ -3,6 +3,6 @@ def pre_build(**kwargs): if not os.path.exists('node_modules'): - subprocess.run(['npm', 'install'], check=True) + subprocess.run(['npm', 'install', '--ignore-scripts'], check=True) subprocess.run(['npm', 'run', 'docs:examples'], check=True) # subprocess.run(['npm', 'run', 'docs:api'], check=True) diff --git a/package.json b/package.json index d3a3afa868..afc58134dc 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test:integration": "nyc mocha './test/integration/'", "test:unit": "nyc mocha './test/unit/'", "test:watch": "mocha './test/unit/' './test/integration/' --watch", - "prepack": "npm run build", + "prepare": "npm run build", "prepublishOnly": "test/examples.sh && npm run docs:examples", "release": "standard-version --skip.tag --infile docs/CHANGELOG.md" },