You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deps: bump Rollup peerDep to 3.7.5+, remove tech debt
- 3.7.5 includes rollup/rollup@ffab4cd
- which fixes the duplicate error logging upstream and allows us to remove the `buildEnd` workaround
- 2.60.0 includes `this.load`, so can remove the `satisfies` check
- 2.14.0 includes `this.meta.watchMode`, so can remove the env check
- remove deprecated `rollupCommonJSResolveHack`
- it hasn't done anything since 6fb0e75 in late 2020 (~2.5 years ago)
- and has been formally deprecated since 74f6761 over a year ago
- remove `objectHashIgnoreUnknownHack` warning
- hasn't been needed for async functions since 9afc8df in early 2020 (~3.5 years ago)
- so I think that's a long enough window to now remove the warning
- also add a link in the docs to `object-hash`
- noticed there wasn't one, despite all the links I added to the docs!
Copy file name to clipboardExpand all lines: README.md
+3-11
Original file line number
Diff line number
Diff line change
@@ -65,10 +65,6 @@ This also allows for passing in different `tsconfig` files depending on your bui
65
65
66
66
Must be before `rollup-plugin-typescript2` in the plugin list, especially when the `browser: true` option is used (see [#66](https://github.com/ezolenko/rollup-plugin-typescript2/issues/66)).
67
67
68
-
#### @rollup/plugin-commonjs
69
-
70
-
See the explanation for `rollupCommonJSResolveHack` option below.
71
-
72
68
#### @rollup/plugin-babel
73
69
74
70
This plugin transpiles code, but doesn't change file extensions. `@rollup/plugin-babel` only looks at code with these extensions [by default](https://github.com/rollup/plugins/tree/master/packages/babel#extensions): `.js,.jsx,.es6,.es,.mjs`. To workaround this, add `.ts` and `.tsx` to its list of extensions.
@@ -165,14 +161,10 @@ See [#108](https://github.com/ezolenko/rollup-plugin-typescript2/issues/108)
165
161
Bail out on first syntactic or semantic error.
166
162
In some cases, setting this to false will result in an exception in Rollup itself (for example, unresolvable imports).
167
163
168
-
*`rollupCommonJSResolveHack`: false
169
-
170
-
_Deprecated_. OS native paths are now _always_ used since [`0.30.0`](https://github.com/ezolenko/rollup-plugin-typescript2/releases/0.30.0) (see [#251](https://github.com/ezolenko/rollup-plugin-typescript2/pull/251)), so this no longer has any effect -- as if it is always `true`.
171
-
172
164
*`objectHashIgnoreUnknownHack`: false
173
165
174
166
The plugin uses your Rollup config as part of its cache key.
175
-
`object-hash` is used to generate a hash, but it can have trouble with some uncommon types of elements.
167
+
[`object-hash`](https://github.com/puleos/object-hash) is used to generate a hash, but it can have trouble with some uncommon types of elements.
176
168
Setting this option to true will make `object-hash` ignore unknowns, at the cost of not invalidating the cache if ignored elements are changed.
177
169
178
170
Only enable this option if you need it (e.g. if you get `Error: Unknown object type "xxx"`) and make sure to run with `clean: true` once in a while and definitely before a release.
@@ -238,8 +230,8 @@ Otherwise the plugin should work in watch mode. Make sure to run a normal build
watchMode=process.env.ROLLUP_WATCH==="true"||!!this.meta.watchMode;// meta.watchMode was added in 2.14.0 to capture watch via Rollup API (i.e. no env var) (c.f. https://github.com/rollup/rollup/blob/master/CHANGELOG.md#2140)
context.error(`Installed Rollup version '${this.meta.rollupVersion}' is outside of supported range '${ROLLUP_VERSION_RANGE}'`);
144
143
145
-
supportsThisLoad=satisfies(this.meta.rollupVersion,">=2.60.0",{includePrerelease : true});// this.load is 2.60.0+ only (c.f. https://github.com/rollup/rollup/blob/master/CHANGELOG.md#2600)
146
-
if(!supportsThisLoad)
147
-
context.warn(()=>`${yellow("You are using a Rollup version '<2.60.0'")}. This may result in type-only files being ignored.`);
context.warn(()=>`${yellow("You are using 'objectHashIgnoreUnknownHack' option")}. If you enabled it because of async functions, try disabling it now.`);
156
-
157
-
if(pluginOptions.rollupCommonJSResolveHack)
158
-
context.warn(()=>`${yellow("You are using 'rollupCommonJSResolveHack' option")}. This is no longer needed, try disabling it now.`);
generateRound=0;// in watch mode, buildEnd resets generate count just before generateBundle for each output
314
303
315
-
if(err)
316
-
{
317
-
buildDone();
318
-
// workaround: err.stack contains err.message and Rollup prints both, causing duplication, so split out the stack itself if it exists (c.f. https://github.com/ezolenko/rollup-plugin-typescript2/issues/103#issuecomment-1172820658)
0 commit comments