Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve helpers relative to JS transformer #6278

Merged
merged 1 commit into from May 13, 2021
Merged

Resolve helpers relative to JS transformer #6278

merged 1 commit into from May 13, 2021

Conversation

devongovett
Copy link
Member

Fixes T-1031

Detects if the require/import is synthetic. If so, resolves relative to the js transformer. This should fix errors like Failed to resolve '@swc/helpers' and regenerator-runtime.

@height
Copy link

height bot commented May 13, 2021

This pull request has been linked to and will mark 1 task as "Done" when merged:

💡Tip: You can link multiple Height tasks to a pull request.

@parcel-benchmark
Copy link

Benchmark Results

Kitchen Sink 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

React HackerNews 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

AtlasKit Editor 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Three.js 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Click here to view a detailed benchmark overview.

Comment on lines +184 to +191
let dir = path.join(
'/tmp/' +
Math.random()
.toString(36)
.slice(2),
);
await outputFS.mkdirp(dir);
ncp(path.join(__dirname, '/integration/swc-helpers'), dir);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this tmp directory for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so it's outside the monorepo. Otherwise it'll still resolve the helpers

@devongovett devongovett merged commit 27d89ef into v2 May 13, 2021
@devongovett devongovett deleted the helper-resolve branch May 13, 2021 16:45
lettertwo added a commit that referenced this pull request Jun 4, 2021
…raph

* bdo/buffer-backed-graph: (37 commits)
  Improve resolver performance (#6328)
  v2.0.0-beta.3.1
  Add it to the nightly release workflow as well
  Configure jemalloc page size for M1 (#6314)
  Update swc (#6307)
  Fix parcelDependencies
  v2.0.0-beta.3
  Update swc (#6289)
  Remove old AdjacencyList, serialize EfficientGraph in Graph, update BundleGraph to use new functions
  Babel ast location, diagnostic, and source location remapping (#6238)
  update contributing guide (#6293)
  Update sourcemap to rc-1.0 (#6279)
  Serve nearest index.html in case the applications has multiple index files (#6250)
  Allow bundling browserify bundles by replacing free requires with undefined (#6260)
  Upgrade flow to 0.151.0 (#6281)
  Use local require for `@babel/core` and `postcss` (#6264)
  Resolve helpers relative to JS transformer (#6278)
  Pure comment for $parcel$interopDefault (#6271)
  Don't transpile spread in JSX with modern targets (#6274)
  Update TS validator assertions (#6272)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants