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

Add auto-commonjs and update swc #30661

Merged
merged 16 commits into from
Oct 30, 2021
Merged

Add auto-commonjs and update swc #30661

merged 16 commits into from
Oct 30, 2021

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Oct 30, 2021

Closes #30596

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running yarn lint

  • This patch contains several patches from swc.

This includes swc-project/swc#2581, which allows customizing the import path for regenerator.

  • This adds auto-detection of common js.

If module.exports is found and module config is not set, module config becomes common js.

  • As bonus, this includes some performance improvements

The logic for analyzing the input source file and parsing options as json is moved from the js thread to a background worker thread.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels Oct 30, 2021
@kdy1 kdy1 marked this pull request as ready for review October 30, 2021 10:58
@ijjk

This comment has been minimized.

@kdy1 kdy1 marked this pull request as draft October 30, 2021 12:08
@kdy1 kdy1 marked this pull request as ready for review October 30, 2021 12:09
@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Oct 30, 2021

Failing test suites

Commit: f7c9438

test/integration/preload-viewport/test/index.test.js

  • Prefetching Links in viewport > should not prefetch already loaded scripts
Expand output

● Prefetching Links in viewport › should not prefetch already loaded scripts

expect(received).toBe(expected) // Object.is equality

Expected: false
Received: true

  397 |     expect(hrefs).toEqual([...new Set(hrefs)])
  398 |
> 399 |     // Verify encoding
      |     ^
  400 |     expect(hrefs.some((e) => e.includes(`%5Bhello%5D-`))).toBe(true)
  401 |   })
  402 |

  at Object.<anonymous> (integration/preload-viewport/test/index.test.js:399:5)

This was referenced Nov 1, 2021
@kdy1 kdy1 deleted the swc-cjs branch January 20, 2022 07:33
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
Closes vercel#30596



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`


 - This patch contains several patches from swc.

This includes swc-project/swc#2581, which allows customizing the import path for regenerator.

 - This adds auto-detection of common js.

If `module.exports` is found and module config is not set, module config becomes common js.

 - As bonus, this includes some performance improvements

The logic for analyzing the input source file and parsing options as json is moved from the js thread to a background worker thread.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2022
@kdy1 kdy1 self-assigned this Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants