Skip to content

Commit

Permalink
Update Rust nightly toolchain (vercel#51757)
Browse files Browse the repository at this point in the history
Matching turbo PR: vercel/turborepo#5376

## Turbopack updates

* vercel/turborepo#5376 <!-- Alex Kirszenberg -
Update nightly toolchain -->
  • Loading branch information
alexkirsz authored Jul 7, 2023
1 parent d660bc9 commit b8589df
Show file tree
Hide file tree
Showing 32 changed files with 173 additions and 146 deletions.
76 changes: 38 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ swc_core = { version = "0.79.13" }
testing = { version = "0.33.20" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230707.2" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230707.3" }
# [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-230707.2" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230707.3" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230707.2" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230707.3" }

# General Deps

Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/core/src/cjs_optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl VisitMut for CjsOptimizer {
// TODO: Config

if let Pat::Ident(name) = &n.name {
if let Some(..) = self.should_rewrite(&v.value) {
if self.should_rewrite(&v.value).is_some() {
let key = name.to_id();

if !self.data.is_prepass {
Expand Down
4 changes: 3 additions & 1 deletion packages/next-swc/crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/

// TODO(alexkirsz) Remove once the diagnostic is fixed.
#![allow(rustc::untranslatable_diagnostic_trivial)]
#![recursion_limit = "2048"]
#![deny(clippy::all)]
#![feature(box_patterns)]
Expand Down Expand Up @@ -311,7 +313,7 @@ impl TransformOptions {

if should_enable_commonjs {
self.swc.config.module = Some(
serde_json::from_str(r##"{ "type": "commonjs", "ignoreDynamic": true }"##).unwrap(),
serde_json::from_str(r#"{ "type": "commonjs", "ignoreDynamic": true }"#).unwrap(),
);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/next-swc/crates/core/tests/fixture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ fn cjs_optimize_fixture(input: PathBuf) {
resolver(unresolved_mark, top_level_mark, false),
cjs_optimizer(
json(
r###"
r#"
{
"packages": {
"next/server": {
Expand All @@ -388,7 +388,7 @@ fn cjs_optimize_fixture(input: PathBuf) {
}
}
}
"###
"#
),
unresolved_ctxt
)
Expand Down
Loading

0 comments on commit b8589df

Please sign in to comment.