Skip to content

Commit

Permalink
fix: use rollup v3, closes #749
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 3, 2022
1 parent 44d3d47 commit 9ce5c13
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 55 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -36,13 +36,13 @@
"joycon": "^3.0.1",
"postcss-load-config": "^3.0.1",
"resolve-from": "^5.0.0",
"rollup": "^2.74.1",
"rollup": "^3.2.5",
"source-map": "0.8.0-beta.0",
"sucrase": "^3.20.3",
"tree-kill": "^1.2.2"
},
"devDependencies": {
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-json": "5.0.1",
"@swc/core": "1.2.218",
"@types/debug": "4.1.7",
"@types/flat": "5.0.2",
Expand All @@ -57,7 +57,7 @@
"postcss-simple-vars": "6.0.3",
"prettier": "2.5.1",
"resolve": "1.20.0",
"rollup-plugin-dts": "4.2.1",
"rollup-plugin-dts": "5.0.0",
"rollup-plugin-hashbang": "2.2.2",
"strip-json-comments": "4.0.0",
"svelte": "3.46.4",
Expand Down
96 changes: 54 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/plugin.ts
Expand Up @@ -5,6 +5,7 @@ import { Format, NormalizedOptions } from '.'
import { outputFile } from './fs'
import { Logger } from './log'
import { MaybePromise } from './utils'
import { SourceMap } from 'rollup'

export type ChunkInfo = {
type: 'chunk'
Expand All @@ -30,7 +31,7 @@ export type RenderChunk = (
) => MaybePromise<
| {
code: string
map?: object | string
map?: object | string | SourceMap | null
}
| undefined
| null
Expand Down
18 changes: 9 additions & 9 deletions test/__snapshots__/index.test.ts.snap
Expand Up @@ -167,6 +167,15 @@ console.log(import_node_fs.default);
"
`;

exports[`not bundle \`package/subpath\` in dts (resolve) 1`] = `
"import * as foo_bar from 'foo/bar';
declare const stuff: foo_bar.Foobar;
export { stuff };
"
`;

exports[`simple 1`] = `
"\\"use strict\\";
var __defProp = Object.defineProperty;
Expand Down Expand Up @@ -204,15 +213,6 @@ var input_default = foo_default;
"
`;

exports[`not bundle \`package/subpath\` in dts (resolve) 1`] = `
"import * as foo_bar from 'foo/bar';
declare const stuff: foo_bar.Foobar;
export { stuff };
"
`;

exports[`support baseUrl and paths in tsconfig.json 1`] = `
"var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
Expand Down

0 comments on commit 9ce5c13

Please sign in to comment.