mirror of
https://github.com/swc-project/swc.git
synced 2024-11-27 13:38:33 +03:00
Chores (#986)
This commit is contained in:
parent
c475ab7f92
commit
c6a10251c9
@ -206,8 +206,8 @@ export class Compiler extends wrapNativeSuper(native.Compiler) {
|
||||
}
|
||||
|
||||
|
||||
const plugin = options.plugin;
|
||||
delete options.plugin;
|
||||
const plugin = options?.plugin;
|
||||
delete options?.plugin;
|
||||
|
||||
if (plugin) {
|
||||
const m = this.parseFileSync(path, options?.jsc?.parser);
|
||||
|
@ -203,6 +203,14 @@ export type Swcrc = Config | Config[];
|
||||
* .swcrc
|
||||
*/
|
||||
export interface Config {
|
||||
/**
|
||||
* Note: The type is string beacuse it follow rust's regex syntax.
|
||||
*/
|
||||
test?: string | string[];
|
||||
/**
|
||||
* Note: The type is string beacuse it follow rust's regex syntax.
|
||||
*/
|
||||
exclude?: string | string[];
|
||||
env?: EnvConfig;
|
||||
jsc?: JscConfig;
|
||||
module?: ModuleConfig;
|
||||
@ -295,9 +303,9 @@ export interface EsParserConfig {
|
||||
/**
|
||||
* Defaults to false.
|
||||
*/
|
||||
jsc?: boolean;
|
||||
jsx?: boolean;
|
||||
/**
|
||||
* Defaults to `false`. This is not implemented yet.
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
numericSeparator?: boolean;
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
export RUST_MIN_STACK=$((1024*1024*16))
|
||||
export RUST_MIN_STACK=16777216
|
||||
export CARGO_INCREMENTAL=0
|
||||
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests"
|
||||
export RUSTDOCFLAGS="-Cpanic=abort"
|
||||
@ -10,9 +10,9 @@ export CARGO_TARGET_DIR=".COVERAGE_DIR"
|
||||
git clone https://github.com/swc-project/ts-parser-test-ref.git ecmascript/parser/tests/typescript/tsc || true
|
||||
(cd ecmascript/parser/tests/typescript/tsc && git pull)
|
||||
|
||||
cargo test --all --all-features --exclude node-swc --exclude wasm --exclude spack
|
||||
cargo test --all --all-features --exclude node-swc --exclude wasm
|
||||
|
||||
zip -0 ccov.zip `find $CARGO_TARGET_DIR \( -name "swc*.gc*" -o -name 'ast_node*.gc*' -o -name 'enum_kind*.gc*' -o -name 'string-enum*.gc*' -o -name 'from_variant*.gc*' \) -print`;
|
||||
zip -0 ccov.zip `find $CARGO_TARGET_DIR \( -name "swc*.gc*" -o -name 'spack*.gc*' -o -name 'ast_node*.gc*' -o -name 'enum_kind*.gc*' -o -name 'string-enum*.gc*' -o -name 'from_variant*.gc*' \) -print`;
|
||||
|
||||
grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" -o lcov.info;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user