diff --git a/.github/workflows/build-test-publish.yaml b/.github/workflows/build-test-publish.yaml index ae5dc68b..ea004a3e 100644 --- a/.github/workflows/build-test-publish.yaml +++ b/.github/workflows/build-test-publish.yaml @@ -68,18 +68,21 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: true - needs: build steps: + # Check out + install rather than restoring the build job's workspace via + # actions/cache. That cross-job cache handoff (path: ./*) stopped working + # after the forced cache@v2 -> v4 migration, leaving these jobs with no + # package.json (npm ENOENT). Each job is now self-contained. + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node uses: actions/setup-node@v2 with: node-version: 14 - - uses: actions/cache@v4 - id: restore-build - with: - path: ./* - key: ${{ github.sha }} + - name: Install dependencies + run: npm install - name: Run linter run: npm run lint:ci @@ -88,17 +91,15 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: true - needs: build steps: + - name: Checkout + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v2 with: node-version: "14" - - uses: actions/cache@v4 - id: restore-build - with: - path: ./* - key: ${{ github.sha }} + - name: Install dependencies + run: npm install - name: Run type-check run: npm run tsc @@ -106,17 +107,15 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: true - needs: build steps: + - name: Checkout + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v2 with: node-version: "14" - - uses: actions/cache@v4 - id: restore-build - with: - path: ./* - key: ${{ github.sha }} + - name: Install dependencies + run: npm install - name: Run unit tests run: npm run test diff --git a/rollup.common.config.js b/rollup.common.config.js index 326bfa5e..cc14bda7 100644 --- a/rollup.common.config.js +++ b/rollup.common.config.js @@ -45,7 +45,12 @@ const config = { ], }), esbuild({ - include: [`${ROOT}/**/*.ts+(|x)`], + // Transpile every .ts/.tsx by extension, regardless of cwd. The previous + // glob `${ROOT}/**/*.ts+(|x)` relied on an extglob that newer picomatch + // (floated in via `npm install`, which ignores our yarn.lock) no longer + // matches — so esbuild silently stopped transpiling TS and every component + // build choked on raw TS in commons (e.g. define-component-patch.ts). + include: /\.tsx?$/, minify: !!production, }), commonjs(),