Skip to content

Commit 5ca3fa7

Browse files
authored
chore: re-enable npm caching [] (#803)
* chore: re-enable npm caching [] * refactor: don't use npm pre- & post- scripts
1 parent b8f17d4 commit 5ca3fa7

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.circleci/config.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
- checkout
2525
- node/install:
2626
node-version: << parameters.node-version >>
27-
with-cache: false
2827
- setup-npm
2928
- run: npm ci
3029
- run:
@@ -41,7 +40,6 @@ jobs:
4140
- checkout
4241
- node/install:
4342
node-version: "20"
44-
with-cache: false
4543
- setup-npm
4644
- run: npm ci
4745
- run: npm run build
@@ -54,7 +52,6 @@ jobs:
5452
- checkout
5553
- node/install:
5654
node-version: "20"
57-
with-cache: false
5855
- setup-npm
5956
- run: npm ci
6057

@@ -69,11 +66,10 @@ jobs:
6966
- run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
7067
- node/install:
7168
node-version: "20"
72-
with-cache: false
7369
- run: npm ci
7470
- run:
7571
name: Releasing
76-
command: npm run semantic-release
72+
command: npm run publish
7773

7874
workflows:
7975
lint-build-release:

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
"prepare": "husky install",
3838
"lint": "eslint --ext .ts ./src",
3939
"lint:fix": "npm run lint -- --fix",
40-
"pretest": "echo ' 🔑 Creating valid keypair for testing' && bash test/make-private-keys.sh",
40+
"generate:key": "echo ' 🔑 Creating valid keypair for testing' && bash test/make-private-keys.sh",
4141
"test:unit": "vitest run src",
4242
"test:integration": "vitest run test",
43-
"test": "npm run test:unit && npm run test:integration",
44-
"build": "rm -rf lib && tsup",
45-
"postbuild": "cp ./lib/index.d.ts ./lib/index.d.cts",
43+
"test": "npm run generate:key && npm run test:unit && npm run test:integration",
44+
"build": "rm -rf lib && tsup && cp ./lib/index.d.ts ./lib/index.d.cts",
4645
"build:docs": "typedoc --options .typedocrc.json src",
4746
"start:docs": "serve ./docs",
48-
"prepublishOnly": "npm run build && npm run build:docs",
47+
"build:all": "npm run build && npm run build:docs",
4948
"semantic-release": "semantic-release",
49+
"publish": "npm run build:all && npm run semantic-release",
5050
"format": "prettier --write ./{src,test}/**/*.ts"
5151
},
5252
"author": "Contentful GmbH",

0 commit comments

Comments
 (0)