diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6e22c25..ae121dee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,11 @@ name: Unit tests -on: pull_request + +on: + push: + branches: + - main + pull_request: + jobs: test: @@ -16,6 +22,7 @@ jobs: - uses: pnpm/action-setup@v4.0.0 - uses: actions/setup-node@v4 with: + node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install dependencies run: pnpm install diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index 8f864372..8a335b6d 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -1,6 +1,10 @@ import typescript from '@rollup/plugin-typescript' -import pkg from './package.json' assert { type: 'json' } -import { builtinModules as builtins } from 'module' +import * as fs from 'node:fs/promises' +import * as path from 'node:path' +import { builtinModules as builtins } from 'node:module' +import { fileURLToPath } from 'node:url' + +const pkg = JSON.parse(await fs.readFile(path.join(fileURLToPath(import.meta.url), '..', 'package.json'))) const deps = Object.keys(pkg.dependencies || {}) diff --git a/packages/vite/rollup.config.js b/packages/vite/rollup.config.js index 8f864372..4ade68b9 100644 --- a/packages/vite/rollup.config.js +++ b/packages/vite/rollup.config.js @@ -1,7 +1,10 @@ import typescript from '@rollup/plugin-typescript' -import pkg from './package.json' assert { type: 'json' } -import { builtinModules as builtins } from 'module' +import * as fs from 'node:fs/promises' +import * as path from 'node:path' +import { builtinModules as builtins } from 'node:module' +import { fileURLToPath } from 'node:url' +const pkg = JSON.parse(await fs.readFile(path.join(fileURLToPath(import.meta.url), '..', 'package.json'))) const deps = Object.keys(pkg.dependencies || {}) export default {