From a60613dbc8179f644a771f6c06d555ac937924c0 Mon Sep 17 00:00:00 2001 From: alistairstead Date: Fri, 23 Jun 2023 22:13:54 +0100 Subject: [PATCH] refactor: using ncc and skip dist test --- .github/workflows/ci.yml | 26 +++++++++++++------------- package.json | 8 ++++---- tsconfig.json | 8 ++++++-- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d88a7b..675f501 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: - main jobs: - build: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -49,15 +49,15 @@ jobs: - name: test run: pnpm run test - - name: build - run: pnpm run build - - - run: | - mkdir -p .sst/dist - touch .sst/dist/manifest.json - echo '{"version": "31.0.0","artifacts": {}}' > .sst/dist/manifest.json - touch sst.config.ts - - - uses: ./ - with: - stage: production + # - name: build + # run: pnpm run build + # + # - run: | + # mkdir -p .sst/dist + # touch .sst/dist/manifest.json + # echo '{"version": "31.0.0","artifacts": {}}' > .sst/dist/manifest.json + # touch sst.config.ts + # + # - uses: ./ + # with: + # stage: production diff --git a/package.json b/package.json index 3e67fd8..013d48e 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,15 @@ "node": "^16.0.0" }, "scripts": { - "build": "ncc build src/index.ts -o dist --transpile-only --minify", + "build": "ncc build src/index.ts -o dist --source-map --license licenses.txt --minify", "format": "prettier --write '**/*.ts'", "format-check": "prettier --check '**/*.ts'", "lint": "eslint src/**/*.ts", "test": "vitest run", - "act": "npm run package && act -j test -W .github/workflows/test.yml", + "act": "npm run build && act -j test -W .github/workflows/ci.yml", "clean:dist": "git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch dist' HEAD", - "bump": "node ./scripts/bump.cjs", - "release": "node ./scripts/release.cjs" + "bump": "node ./scripts/bump.js", + "release": "node ./scripts/release.js" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index 254275b..416f496 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,10 @@ { - "extends": "@tsconfig/node16/tsconfig.json", "compilerOptions": { - "target": "ESNEXT" + "target": "esnext", + "module": "commonjs", + "noEmit": true, + "isolatedModules": true, + "strict": true, + "esModuleInterop": true } }