mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 21:54:36 +03:00
fix(cli): Configure GLOBALS
(#6061)
**Related issue:** - Closes https://github.com/swc-project/swc/issues/6059.
This commit is contained in:
parent
39874529e0
commit
6cdb5ed97f
@ -16,7 +16,9 @@ use swc_core::{
|
||||
config::{Config, ConfigFile, Options},
|
||||
try_with_handler, Compiler, HandlerOpts, TransformOutput,
|
||||
},
|
||||
common::{errors::ColorConfig, sync::Lazy, FileName, FilePathMapping, SourceFile, SourceMap},
|
||||
common::{
|
||||
errors::ColorConfig, sync::Lazy, FileName, FilePathMapping, SourceFile, SourceMap, GLOBALS,
|
||||
},
|
||||
trace_macro::swc_trace,
|
||||
};
|
||||
use walkdir::WalkDir;
|
||||
@ -366,7 +368,11 @@ impl CompileOptions {
|
||||
color: ColorConfig::Always,
|
||||
skip_filename: false,
|
||||
},
|
||||
|handler| compiler.process_js_file(fm, handler, &options),
|
||||
|handler| {
|
||||
GLOBALS.set(&Default::default(), || {
|
||||
compiler.process_js_file(fm, handler, &options)
|
||||
})
|
||||
},
|
||||
)
|
||||
};
|
||||
|
||||
|
@ -18,10 +18,7 @@ function sleep(ms: number) {
|
||||
|
||||
console.log(`Latest commit message: ${latestCommitMessage}`);
|
||||
|
||||
if (
|
||||
!latestCommitMessage.startsWith("test(") &&
|
||||
!latestCommitMessage.startsWith("chore:")
|
||||
) {
|
||||
if (!latestCommitMessage.startsWith("chore:")) {
|
||||
console.log(
|
||||
`Auto rebase script cannot work because the latest commit may require a version bump`
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user