rsnext/Cargo.toml
OJ Kwon 71d8064b3d
feat(next-core): relay transform plugin (#48899)
<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### Why?

### How?

Closes NEXT-
Fixes #

-->

#### What
Part 1 for WEB-848. 

This PR implements initial path to enable relay compiler option in
Turbopack. PR is based on approach WEB-955, that passing custom plugin
transform itself instead of trying to pass down configuration into
turbopack. In result, this PR requires counterpart turbopack PR at
https://github.com/vercel/turbo/pull/4721.

PR also refactors next-shared's transform bit, as we have grown number
of custom transforms.

Unfortunately there are some runtime errors with this transforms, so it
is not possible to use relay actually yet. WEB-956 tracks this.
(https://github.com/swc-project/plugins/pull/179)

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-05-09 11:09:34 -07:00

128 lines
3.9 KiB
TOML

[workspace]
members = [
"packages/next-swc/crates/core",
"packages/next-swc/crates/napi",
"packages/next-swc/crates/wasm",
"packages/next-swc/crates/next-build",
"packages/next-swc/crates/next-core",
"packages/next-swc/crates/next-dev",
"packages/next-swc/crates/next-dev-tests",
"packages/next-swc/crates/next-transform-font",
"packages/next-swc/crates/next-transform-dynamic",
"packages/next-swc/crates/next-transform-strip-page-exports",
]
[profile.dev.package.swc_css_prefixer]
opt-level = 2
# This is a workaround for wasm timeout issue
[profile.dev.package."*"]
debug-assertions = false
[profile.release]
lto = true
[workspace.dependencies]
# Workspace crates
next-build = { path = "packages/next-swc/crates/next-build" }
next-core = { path = "packages/next-swc/crates/next-core", default-features = false }
next-dev = { path = "packages/next-swc/crates/next-dev", default-features = false, features = [
"serializable",
] }
next-dev-tests = { path = "packages/next-swc/crates/next-dev-tests" }
next-transform-font = { path = "packages/next-swc/crates/next-transform-font" }
next-transform-dynamic = { path = "packages/next-swc/crates/next-transform-dynamic" }
next-transform-strip-page-exports = { path = "packages/next-swc/crates/next-transform-strip-page-exports" }
# SWC crates
# Keep consistent with preset_env_base through swc_core
swc_core = { version = "0.75.41" }
testing = { version = "0.33.4" }
# Turbo crates
turbo-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230508.2" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230508.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230508.2" }
# General Deps
# Be careful when selecting tls backend, including change default tls backend.
# If you changed, must verify with ALL build targets with next-swc to ensure
# it works. next-swc have various platforms, some doesn't support native (using openssl-sys)
# and some aren't buildable with rustls.
reqwest = { version = "0.11.14", default-features = false }
chromiumoxide = { version = "0.4.0", features = [
"tokio-runtime",
], default-features = false }
# For matching on errors from chromiumoxide. Keep in
# sync with chromiumoxide's tungstenite requirement.
tungstenite = "0.17.3"
# flate2_zlib requires zlib, use flate2_rust
allsorts = { version = "0.14.0", default_features = false, features = [
"outline",
"flate2_rust",
] }
anyhow = "1.0.69"
assert_cmd = "2.0.8"
async-compression = { version = "0.3.13", default-features = false, features = [
"gzip",
"tokio",
] }
async-trait = "0.1.64"
atty = "0.2.14"
chrono = "0.4.23"
clap = "4.1.6"
clap_complete = "4.1.2"
concurrent-queue = "2.1.0"
console = "0.15.5"
console-subscriber = "0.1.8"
criterion = "0.4.0"
dashmap = "5.4.0"
dialoguer = "0.10.3"
dunce = "1.0.3"
futures = "0.3.26"
futures-retry = "0.6.0"
httpmock = { version = "0.6.7", default-features = false }
indexmap = "1.9.2"
indicatif = "0.17.3"
indoc = "2.0.0"
itertools = "0.10.5"
lazy_static = "1.4.0"
log = "0.4.17"
mime = "0.3.16"
nohash-hasher = "0.2.0"
once_cell = "1.17.1"
owo-colors = "3.5.0"
parking_lot = "0.12.1"
pathdiff = "0.2.1"
pin-project-lite = "0.2.9"
predicates = "2.1.5"
pretty_assertions = "1.3.0"
proc-macro2 = "1.0.51"
qstring = "0.7.2"
quote = "1.0.23"
rand = "0.8.5"
regex = "1.7.0"
rstest = "0.16.0"
rustc-hash = "1.1.0"
semver = "1.0.16"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.93"
serde_qs = "0.11.0"
serde_yaml = "0.9.17"
syn = "1.0.107"
tempfile = "3.3.0"
thiserror = "1.0.38"
tiny-gradient = "0.1.0"
tokio = "1.25.0"
tokio-util = { version = "0.7.7", features = ["io"] }
tracing = "0.1.37"
url = "2.2.2"
urlencoding = "2.1.2"
webbrowser = "0.8.7"
dhat = { version = "0.3.2" }