From 09e4e3028752adaf5039bcaea8a137ac6f8ac7de Mon Sep 17 00:00:00 2001 From: pngwn Date: Sat, 17 Aug 2024 02:06:15 +0100 Subject: [PATCH] fixes --- .github/workflows/mdsvex.yaml | 2 +- packages/mdsvex/rollup.config.js | 11 +++++------ packages/svast-stringify/rollup.config.js | 5 +++-- packages/svast-utils/rollup.config.js | 4 +++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/mdsvex.yaml b/.github/workflows/mdsvex.yaml index 99ba4730..a46769e5 100644 --- a/.github/workflows/mdsvex.yaml +++ b/.github/workflows/mdsvex.yaml @@ -43,7 +43,7 @@ jobs: cache: 'pnpm' cache-dependency-path: '**/pnpm-lock.yaml' - run: pnpm i --frozen-lockfile - - run: pnpm test + - run: pnpm test:run - run: pnpm -r build env: CI: true diff --git a/packages/mdsvex/rollup.config.js b/packages/mdsvex/rollup.config.js index 8a2e3f5b..7f48519f 100644 --- a/packages/mdsvex/rollup.config.js +++ b/packages/mdsvex/rollup.config.js @@ -1,18 +1,17 @@ -import resolve from '@rollup/plugin-node-resolve'; +import node from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; -// import builtins from 'rollup-plugin-node-builtins'; -// import globals from 'rollup-plugin-node-globals'; import sucrase from '@rollup/plugin-sucrase'; import dts from 'rollup-plugin-dts'; -// import replace from '@rollup/plugin-replace'; +import { readFileSync } from 'fs'; +import { resolve } from 'path'; -import pkg from './package.json' assert { type: 'json' }; +const pkg = JSON.parse(readFileSync(resolve('package.json'), 'utf-8')); export default [ { plugins: [ - resolve({ preferBuiltins: true }), + node({ preferBuiltins: true }), commonjs({ namedExports: { 'svelte/compiler': ['parse'] } }), json(), sucrase({ transforms: ['typescript'] }), diff --git a/packages/svast-stringify/rollup.config.js b/packages/svast-stringify/rollup.config.js index f9b68d79..05e521d5 100644 --- a/packages/svast-stringify/rollup.config.js +++ b/packages/svast-stringify/rollup.config.js @@ -1,8 +1,9 @@ import ts from '@rollup/plugin-typescript'; import dts from 'rollup-plugin-dts'; +import { readFileSync } from 'fs'; +import { resolve } from 'path'; -import pkg from './package.json' assert { type: 'json' }; - +const pkg = JSON.parse(readFileSync(resolve('package.json'), 'utf-8')); export default [ { plugins: [ts()], diff --git a/packages/svast-utils/rollup.config.js b/packages/svast-utils/rollup.config.js index f9b68d79..68e6c597 100644 --- a/packages/svast-utils/rollup.config.js +++ b/packages/svast-utils/rollup.config.js @@ -1,7 +1,9 @@ import ts from '@rollup/plugin-typescript'; import dts from 'rollup-plugin-dts'; +import { readFileSync } from 'fs'; +import { resolve } from 'path'; -import pkg from './package.json' assert { type: 'json' }; +const pkg = JSON.parse(readFileSync(resolve('package.json'), 'utf-8')); export default [ {