29 Commits

Author SHA1 Message Date
Benjamin Woodruff a4c1a0cd72 Turbopack: Rename crates/napi to crates/next-napi-bindings and update crate name (#89314)
Disclaimer: This PR is entirely claude+opencode generated.

- Crate name said `next-swc-napi`, which was confusing, because this has a lot more than swc bindings nowdays.
- The crate name didn't match the directory name, which often confused agents.

This does not change the npm package name, as that would likely have a much larger blast radius, and could break more things, to a point where it may not be worth it.
2026-01-30 15:36:57 -08:00
Jiwon Choi f3f6b6c452 [release] couple next and @next/swc versions (#79036)
### Why?

Since Next.js emits a debug warning to help catch when a stale
`@next/swc` version is being used, couple their versions to be published
together.


https://github.com/vercel/next.js/blob/3f2a3647ee619c92f2d576b83dfde748003a7f31/packages/next/src/build/swc/index.ts#L131-L139
2025-05-19 19:47:55 +02:00
hrmny cad3a51049 refactor: move rust crates to the repo root directory (#67780)
### Why?
In preparation for moving all turbopack crates

Also makes them easier to work with in general.

Closes PACK-3164
2024-07-22 18:41:27 +02:00
JJ Kasper 04b13f52a5 Update error handling in publish scripts (#62754)
Seems we aren't ignoring the already published error correctly.

x-ref:
https://github.com/vercel/next.js/actions/runs/8118349923/job/22192598805

Closes NEXT-2668
2024-03-02 00:40:51 +00:00
OJ Kwon bb25edfdd4 ci(workflow): restore publish wasm binary (#59414) 2023-12-08 11:44:24 -08:00
Sukka 27dcd26c43 chore: replace fs-extra usage in scripts/ (#57215)
The PR is the continuation of #56917 and #57030.

The PR replaces `fs-extra#copy` with Node.js built-in `fs.cp` API (which is almost identical to `fs-extra#copy`, and has been available since Node.js 16). The PR also provides a workaround for flaky Windows `fs.rename` operation (#57030).

cc @styfle @wbinnssmith
2023-11-15 13:34:18 +00:00
JJ Kasper d670c5c860 Update publish-native script for wasm change (#57472)
x-ref:
https://github.com/vercel/next.js/actions/runs/6649134570/job/18067246584
x-ref: https://github.com/vercel/next.js/pull/57437
2023-10-25 21:41:43 -07:00
JJ Kasper efaddcda60 Fix race condition with publish (#51105)
We publish multiple packages in parallel which can cause issues with the
prepublish only script running as turbo clearing/restoring dist caches
can causing files to be missing if a publish is in progress. We also
don't need to run these as all packages are already built prior to
publishing. This also includes fixes for release stats.
2023-06-10 14:05:27 -07:00
Steven ce2e2265e6 Add missing repository prop to package.json in swc-wasm (#48805)
- Follow up to https://github.com/vercel/next.js/pull/48803

Fixes
https://github.com/vercel/next.js/actions/runs/4791615248/jobs/8523283909#step:10:258
2023-04-24 20:24:55 -05:00
Rinku Chaudhari dff39acc30 fix typo in comment and unused variable remove (#45307)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/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`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-02 14:55:23 -08:00
JJ Kasper 6b863fe294 Apply publish step optimizations (#43620)
Follow-up to https://github.com/vercel/next.js/pull/32337 this removes
the un-necessary step where we fetch all of the tags which requires
pulling a lot of un-necessary git history inflating cache size and
publish times.

The only reason these tags were needing to be fetched is due to an issue
in how the `actions/checkout` step works
(https://github.com/actions/checkout/issues/882).

This reduces the publish times by at least 4 minutes by removing the
tags fetching step
https://github.com/vercel/next.js/actions/runs/3598569786/jobs/6061449995#step:16:14

As a further optimization this adds concurrency to the `npm publish`
calls themselves to hopefully reduce time spent there as well.
2022-12-01 21:48:51 -08:00
JJ Kasper 47e5ebe0b2 update publish 2022-10-25 09:14:29 -07:00
JJ Kasper 50b98d5081 Tolerate already published error for retrying (#40812)
This updates our `publish-native` script to tolerate the already
published npm error so that we can retry publishing on an `npm` [service
error like noticed
here](https://github.com/vercel/next.js/actions/runs/3108335849/jobs/5037966318#step:10:2076).
We probably want to migrate away from using `lerna` for publishing the
non-swc packages as well so that we can retry there as well but will
investigate that in a follow-up.

x-ref:
https://github.com/vercel/next.js/actions/runs/3108335849/jobs/5038069555
2022-09-22 14:35:09 -07:00
Maia Teegarden a79d4fc366 Extract next-swc Rust code into its own package (#31635)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-21 12:59:56 +01:00
JJ Kasper cdfd612416 Ensure wasm package.json is written before publish (#31568) 2021-11-18 00:01:38 -06:00
Maia Teegarden b80c378975 Add/wasm build (#31470) 2021-11-17 20:01:02 +01:00
JJ Kasper 81a4cd2c6b Re-enable linux-musl-x64 build target (#30910)
* Re-enable linux-musl-x64 build target

* copy swc build command

* uncomment needs

* remove strip

* update napi additional
2021-11-03 15:03:50 -05:00
Maia Teegarden b5a89160f7 Chore/rust workflow (#30577)
* Remove prebuilt binaries from repo

* Prefer locally built binary

* Add binary packages as optionalDependencies

* Remove build-native workflow for prebuilt binaries

* Remove binaries from checkCompiled job

* Change build-native command to default to dev

* Add build-native-dev and have tests depend on it

* Update contributing

* Run ls to make inspect artifact download

* Use correct artifact download path

* Try using reusable workflows

* Resort to duplication for now

* Inspect artifact download

* Ensure native is copied for PR stats

* Copy after ref checkout and log binaries for PR stats

* fix typo

* copy right before linking/packing

* Use fs.copy

* fix test for now

Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
2021-10-29 13:56:56 -05:00
JJ Kasper 18fc5488f9 Fix publish native including non-packages (#30589) 2021-10-28 19:36:30 -05:00
JJ Kasper 4c38c89c29 Use unfiltered SWC packages when updating optional (#30571) 2021-10-28 13:31:54 -05:00
JJ Kasper d43e05c61c Use fallback SWC version when binary publish fails (#30568) 2021-10-28 11:44:19 -05:00
JJ Kasper 63024d32b4 Update publish-native to not block on error (#30565) 2021-10-28 11:26:09 -05:00
Tobias Koppers c0dd481ea6 exclude musl from target (#30557) 2021-10-28 16:58:58 +02:00
JJ Kasper 5544adc481 Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
Maia Teegarden 9d44771895 USe await correctly (#28053) 2021-08-12 21:06:31 -07:00
Maia Teegarden 367117e857 publish flow fixes (#28050)
* Publish native packages publicly

* Remove unnecessary await

* Use --no-git-reset lerna option

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-12 19:07:57 -07:00
Maia Teegarden ff5e444284 Use @next scope for native packages (#28046) 2021-08-12 13:59:53 -07:00
Maia Teegarden f0678979f1 Fix publish native script (#28037)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-12 09:46:39 -07:00
Maia Teegarden b2c7b316cb Next swc publish flow (redo) (#27984)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-12 12:22:50 +02:00