Skip to content

Commit e471730

Browse files
committed
Merge branch 'next' into dist-tag
2 parents 8c9680f + 26043d2 commit e471730

File tree

12 files changed

+113
-93
lines changed

12 files changed

+113
-93
lines changed

crates/pack-core/src/client/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,10 @@ pub async fn get_client_resolve_options_context(
445445

446446
let custom_conditions = vec![mode.await?.condition().into()];
447447
let resolve_options_context = ResolveOptionsContext {
448+
enable_typescript: true,
449+
enable_react: true,
450+
enable_mjs_extension: true,
451+
custom_extensions: config.resolve_extension().owned().await?,
448452
enable_node_modules: Some(project_path.root().owned().await?),
449453
custom_conditions,
450454
import_map: Some(client_import_map),
@@ -457,10 +461,6 @@ pub async fn get_client_resolve_options_context(
457461
..Default::default()
458462
};
459463
Ok(ResolveOptionsContext {
460-
enable_typescript: true,
461-
enable_react: true,
462-
enable_mjs_extension: true,
463-
custom_extensions: config.resolve_extension().owned().await?,
464464
rules: vec![(
465465
foreign_code_context_condition(config).await?,
466466
resolve_options_context.clone().resolved_cell(),

crates/pack-tests/tests/snapshot.rs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,14 @@ async fn run(resource: PathBuf) -> Result<()> {
111111
},
112112
noop_backing_storage(),
113113
));
114-
match tt
115-
.run(async move {
116-
let emit_op = run_inner_options(resource.to_str().unwrap().into());
117-
emit_op.read_strongly_consistent().await?;
118-
apply_effects(emit_op).await?;
119-
120-
Ok(())
121-
})
122-
.await
123-
{
124-
Ok(()) => {}
125-
Err(e) => return Err(e.into()),
126-
}
114+
tt.run_once(async move {
115+
let emit_op = run_inner_options(resource.to_str().unwrap().into());
116+
emit_op.read_strongly_consistent().await?;
117+
apply_effects(emit_op).await?;
118+
119+
Ok(())
120+
})
121+
.await?;
127122

128123
Ok(())
129124
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export const foo = "foo";
2-
export const bar = "bar";
2+
export const bar = "bar";
3+
export const a = "a from alias test";
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { aliasA as aliasB } from "alias-pkg";
2+
3+
console.log(aliasB);
4+
5+
export { aliasB }
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { foo } from 'hello-a';
2-
import { aliasPkg } from "alias-pkg";
2+
import { aliasPkg, aliasA } from "alias-pkg";
33
import { bar } from '@@/a';
4+
import { aliasB } from '@@/b';
45

56
console.log(foo, aliasPkg, bar);
67

7-
console.log('xxxx');
8+
console.log('a from alias-pkg', aliasA);
9+
console.log('b from alias-pkg', aliasB);

crates/pack-tests/tests/snapshot/basic/alias/output/crates_pack-tests_tests_snapshot_450cdc63.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

crates/pack-tests/tests/snapshot/basic/alias/output/crates_pack-tests_tests_snapshot_450cdc63.js.map

Lines changed: 0 additions & 8 deletions
This file was deleted.

crates/pack-tests/tests/snapshot/basic/alias/output/crates_pack-tests_tests_snapshot_d4ef97b5.js

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pack-tests/tests/snapshot/basic/alias/output/crates_pack-tests_tests_snapshot_d4ef97b5.js.map

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([
22
typeof document === "object" ? document.currentScript : undefined,
3-
{"otherChunks":["crates_pack-tests_tests_snapshot_450cdc63.js"],"runtimeModuleIds":[70]}
3+
{"otherChunks":["crates_pack-tests_tests_snapshot_d4ef97b5.js"],"runtimeModuleIds":[70]}
44
]);
55
// Dummy runtime

0 commit comments

Comments
 (0)