Skip to content

Commit eef600d

Browse files
authored
Revert "Do not use deprecated rollup options (#127)" (#128)
This reverts commit b1d5c07.
1 parent b1d5c07 commit eef600d

7 files changed

+11
-40
lines changed

dist/index.d.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ export default function typescript(options?: Partial<IOptions>): {
99
resolveId(importee: string, importer: string): string | null;
1010
load(id: string): string | undefined;
1111
transform(this: IRollupContext, code: string, id: string): IRollupCode | undefined;
12-
generateBundle(options: IRollupOptions, _bundle: any, isWrite: boolean): void;
13-
_ongenerate(): void;
14-
_onwrite({ dest, file }: IRollupOptions): void;
12+
ongenerate(): void;
13+
onwrite({ dest, file }: IRollupOptions): void;
1514
};
1615
//# sourceMappingURL=index.d.ts.map

dist/index.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/rollup-plugin-typescript2.cjs.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -21602,15 +21602,7 @@ function typescript(options) {
2160221602
}
2160321603
return undefined;
2160421604
},
21605-
generateBundle(options, _bundle, isWrite) {
21606-
if (isWrite) {
21607-
this._onwrite(options);
21608-
}
21609-
else {
21610-
this._ongenerate();
21611-
}
21612-
},
21613-
_ongenerate() {
21605+
ongenerate() {
2161421606
context.debug(() => `generating target ${generateRound + 1}`);
2161521607
if (pluginOptions.check && watchMode && generateRound === 0) {
2161621608
cache().walkTree((id) => {
@@ -21632,7 +21624,7 @@ function typescript(options) {
2163221624
cache().done();
2163321625
generateRound++;
2163421626
},
21635-
_onwrite({ dest, file }) {
21627+
onwrite({ dest, file }) {
2163621628
if (parsedConfig.options.declaration) {
2163721629
lodash_2(parsedConfig.fileNames, (name) => {
2163821630
const key = normalize(name);

dist/rollup-plugin-typescript2.cjs.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollup-plugin-typescript2.es.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -21598,15 +21598,7 @@ function typescript(options) {
2159821598
}
2159921599
return undefined;
2160021600
},
21601-
generateBundle(options, _bundle, isWrite) {
21602-
if (isWrite) {
21603-
this._onwrite(options);
21604-
}
21605-
else {
21606-
this._ongenerate();
21607-
}
21608-
},
21609-
_ongenerate() {
21601+
ongenerate() {
2161021602
context.debug(() => `generating target ${generateRound + 1}`);
2161121603
if (pluginOptions.check && watchMode && generateRound === 0) {
2161221604
cache().walkTree((id) => {
@@ -21628,7 +21620,7 @@ function typescript(options) {
2162821620
cache().done();
2162921621
generateRound++;
2163021622
},
21631-
_onwrite({ dest, file }) {
21623+
onwrite({ dest, file }) {
2163221624
if (parsedConfig.options.declaration) {
2163321625
lodash_2(parsedConfig.fileNames, (name) => {
2163421626
const key = normalize$1(name);

dist/rollup-plugin-typescript2.es.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

+2-14
Original file line numberDiff line numberDiff line change
@@ -270,19 +270,7 @@ export default function typescript(options?: Partial<IOptions>)
270270
return undefined;
271271
},
272272

273-
generateBundle(options: IRollupOptions, _bundle: any, isWrite: boolean): void
274-
{
275-
if (isWrite)
276-
{
277-
this._onwrite(options);
278-
}
279-
else
280-
{
281-
this._ongenerate();
282-
}
283-
},
284-
285-
_ongenerate(): void
273+
ongenerate(): void
286274
{
287275
context.debug(() => `generating target ${generateRound + 1}`);
288276

@@ -320,7 +308,7 @@ export default function typescript(options?: Partial<IOptions>)
320308
generateRound++;
321309
},
322310

323-
_onwrite({ dest, file }: IRollupOptions): void
311+
onwrite({ dest, file }: IRollupOptions)
324312
{
325313
if (parsedConfig.options.declaration)
326314
{

0 commit comments

Comments
 (0)