Skip to content

Commit

Permalink
fix: remove legacy import assertion unsupported by Node v22
Browse files Browse the repository at this point in the history
  • Loading branch information
geigerzaehler committed Oct 9, 2024
1 parent 074f9f7 commit 0436e06
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Unit tests
on: pull_request

on:
push:
branches:
- main
pull_request:


jobs:
test:
Expand All @@ -16,6 +22,7 @@ jobs:
- uses: pnpm/[email protected]
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
Expand Down
8 changes: 6 additions & 2 deletions packages/core/rollup.config.js
Original file line number Diff line number Diff line change
@@ -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 || {})

Expand Down
7 changes: 5 additions & 2 deletions packages/vite/rollup.config.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 0436e06

Please sign in to comment.