Skip to content

Commit 39c235d

Browse files
authored
chore: use npm CI and update package.json scripts (#330)
*Issue #, if available:* *Description of changes:* - `npm ci` should be used which respects all the locked versions in `package-lock.json` - Updating body-parser version in package-lock.json based on the dependabot alert. - adding main/module/types for people using legacy typescript configurations with `moduleResolution: node` - updating clean scripts to clear .tsbuildinfo and .rollup.cache folders - fail fast when integ tests fail with `bail` option in integ test config By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent a3bef26 commit 39c235d

File tree

10 files changed

+37
-38
lines changed

10 files changed

+37
-38
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
node-version: 22.x
4141
cache: "npm"
4242
- name: Install dependencies
43-
run: npm run install-all
43+
run: npm ci
4444
- name: Build project
4545
run: npm run build
4646
- name: Upload build artifacts
@@ -113,7 +113,7 @@ jobs:
113113

114114
- name: Install dependencies
115115
run: |
116-
npm run install-all
116+
npm ci
117117
118118
- name: Get AWS Credentials
119119
id: credentials

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
path: .
4444

4545
- name: Install dependencies
46-
run: npm run install-all
46+
run: npm ci
4747

4848
- name: Deploy functions
4949
id: deploy-functions
@@ -88,7 +88,7 @@ jobs:
8888

8989
- name: Install dependencies
9090
run: |
91-
npm run install-all
91+
npm ci
9292
9393
- name: Run Jest integration tests
9494
env:

.github/workflows/sync-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: martinbeentjes/npm-get-version-action@v1.3.1
4848
with:
4949
path: packages/${{ inputs.package_name }}
50-
- run: npm run install-all
50+
- run: npm ci
5151
- run: npm run build
5252
- name: Navigate to package and pack
5353
working-directory: packages/${{ inputs.package_name }}

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ jobs:
3131
name: built-artifacts
3232
path: .
3333
- name: Install dependencies
34-
run: npm run install-all
34+
run: npm ci
3535
- name: Run tests
3636
run: npm run test

package-lock.json

Lines changed: 18 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/aws-durable-execution-sdk-js-eslint-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"scripts": {
1111
"build": "tsc",
1212
"test": "jest",
13-
"clean": "rm -rf dist node_modules"
13+
"clean": "rm -rf dist node_modules .tsbuildinfo"
1414
},
1515
"keywords": [
1616
"eslint",

packages/aws-durable-execution-sdk-js-examples/jest.config.integration.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ module.exports = {
77
...defaultPreset,
88
testMatch: ["**/src/examples/**/*.test.ts"],
99
testTimeout: 90000,
10+
testNamePattern: "cloud",
11+
bail: true,
1012
};

packages/aws-durable-execution-sdk-js-examples/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
},
2424
"scripts": {
25-
"clean": "rm -rf build/ build coverage node_modules/ dist/ *.zip",
25+
"clean": "rm -rf build/ build coverage node_modules/ dist/ *.zip .tsbuildinfo .rollup.cache",
2626
"release": "npm run build && mkdir -p build/aws-durable-execution-sdk-js-examples && npm run copy-files",
2727
"prebuild": "rm -rf build/aws-durable-execution-sdk-js-examples",
2828
"postbuild": "npm run generate-sam-template",
@@ -38,7 +38,7 @@
3838
"copy-catalog": "cp examples-catalog.json build/aws-durable-execution-sdk-js-examples/",
3939
"generate-sam-template": "node scripts/generate-sam-template.js",
4040
"test": "npm run unit-test",
41-
"test:integration": "NODE_ENV=integration jest --config jest.config.integration.js --testNamePattern=cloud",
41+
"test:integration": "NODE_ENV=integration jest --config jest.config.integration.js",
4242
"pretest-with-sdk-coverage": "node scripts/copy-sdk-source.js",
4343
"test-with-sdk-coverage": "jest --config jest.config.sdk-coverage.js --collectCoverage",
4444
"coverage-to-csv": "node scripts/coverage-to-csv.js",

packages/aws-durable-execution-sdk-js-testing/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
"engines": {
99
"node": ">=22"
1010
},
11+
"main": "./dist-cjs/index.js",
12+
"module": "./dist/index.mjs",
13+
"types": "./dist-types/index.d.ts",
1114
"bin": {
1215
"run-durable": "./dist/cli/run-durable.js"
1316
},
1417
"scripts": {
15-
"clean": "rm -rf dist dist-cjs dist-types node_modules coverage",
18+
"clean": "rm -rf dist dist-cjs dist-types node_modules coverage .tsbuildinfo .rollup.cache",
1619
"build": "concurrently npm:build:esm npm:build:cjs npm:build:types",
1720
"build:esm": "rollup --config rollup.config.mjs --environment MODE:esm",
1821
"build:cjs": "rollup --config rollup.config.mjs --environment MODE:cjs",

packages/aws-durable-execution-sdk-js/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"engines": {
99
"node": ">=22"
1010
},
11+
"main": "./dist-cjs/index.js",
12+
"module": "./dist/index.mjs",
13+
"types": "./dist-types/index.d.ts",
1114
"exports": {
1215
".": {
1316
"types": "./dist-types/index.d.ts",
@@ -38,7 +41,7 @@
3841
"lint:fix": "eslint src --ext .ts --fix",
3942
"prepublishOnly": "npm test && npm run lint && npm run build",
4043
"run-locally": "tsx ./src/run-durable.ts",
41-
"clean": "rm -rf node_modules dist dist-cjs dist-types coverage",
44+
"clean": "rm -rf node_modules dist dist-cjs dist-types coverage .tsbuildinfo .rollup.cache",
4245
"prepack": "npm run build"
4346
},
4447
"devDependencies": {

0 commit comments

Comments
 (0)