docs/clean: formally deprecate rollupCommonJSResolveHack#367
Merged
ezolenko merged 2 commits intoJun 24, 2022
Conversation
- this has had no effect since 6fb0e75, released in 0.30.0 - that changed the code to always return OS native paths via the NodeJS Path API - so setting `rollupCommonJSResolveHack` would make no difference either `true` or `false` - effectively, it's as if it's always `true` now - formally state now that this is deprecated in the docs - as well as when that occurred and what it means - also add a warning in `options` similar to the existing one for `objectHashIgnoreUnknownHack` - remove the `resolve` dependency as well - it turns out something in the devDeps still uses it, so it didn't get fully removed in the `package-lock.json` - `resolve` was never needed anyway as we could've used NodeJS's native `path.resolve` or `require.resolve` instead - `resolve` was created for `browserify` after all, where one can't use NodeJS APIs - but we run on NodeJS and can and already do use NodeJS APIs, including both `path.resolve` _and_ `require.resolve` - I actually started this commit just to remove the dep, then realized the entire code path is obsolete
This was referenced Sep 18, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Formally deprecate
rollupCommonJSResolveHackas it's been obsolete since 0.30.0Details
this has had no effect since Fix duplicate output with multiple entry points on Windows (host normalization) #251
rollupCommonJSResolveHackwould make no difference eithertrueorfalsetruenowformally state now that this is deprecated in the docs
also add a warning in
optionssimilar to the existing one forobjectHashIgnoreUnknownHack(from cd76b42, which was added to my first major contribution back in (fix): upgrade object-hash to support async/await syntax #203 🙂 )remove the
resolvedependency as wellpackage-lock.jsonresolvewas never needed anyway as we could've used NodeJS's nativepath.resolveorrequire.resolveinstead (noted this at the bottom of rpt2 does not resolve pnpm symlinked dependencies #234 (comment))resolvewas created forbrowserifyafter all, where one can't use NodeJS APIspath.resolveandrequire.resolveReferences
resolveIdpaths? rollup/rollup#2952 seems to be a more-or-less equivalent issue as wellrollup-plugin-commonjs: namedExports is using non-normalized resolved module path as module id rollup/rollup-plugin-commonjs#177commonjsis internally consistent, it shouldn't matter what kind of paths are passed to it, as it is normalized to the same string either way10.1.0, which seems to have been the last version before the move to@rollup/plugin-commonjs