Skip to content

Commit

Permalink
feat(es/parser): Emit an error for top-level await in script (#2094)
Browse files Browse the repository at this point in the history
swc_ecma_parser:
 - Report an error for a top-level await statements.
  • Loading branch information
sosukesuzuki authored Aug 17, 2021
1 parent 879a0f3 commit 33bdff0
Show file tree
Hide file tree
Showing 24 changed files with 163 additions and 121 deletions.
40 changes: 20 additions & 20 deletions Cargo.lock

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

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2018"
license = "Apache-2.0/MIT"
name = "swc"
repository = "https://github.com/swc-project/swc.git"
version = "0.42.0"
version = "0.43.0"

[lib]
name = "swc"
Expand All @@ -35,27 +35,27 @@ serde = {version = "1", features = ["derive"]}
serde_json = "1"
sourcemap = "6"
swc_atoms = {version = "0.2", path = "./atoms"}
swc_bundler = {version = "0.53.0", path = "./bundler"}
swc_bundler = {version = "0.54.0", path = "./bundler"}
swc_common = {version = "0.11.6", path = "./common", features = ["sourcemap", "concurrent"]}
swc_ecma_ast = {version = "0.49.4", path = "./ecmascript/ast"}
swc_ecma_codegen = {version = "0.66.3", path = "./ecmascript/codegen"}
swc_ecma_ext_transforms = {version = "0.24.1", path = "./ecmascript/ext-transforms"}
swc_ecma_codegen = {version = "0.67.0", path = "./ecmascript/codegen"}
swc_ecma_ext_transforms = {version = "0.25.0", path = "./ecmascript/ext-transforms"}
swc_ecma_loader = {version = "0.15.0", path = "./ecmascript/loader", features = ["lru", "node", "tsc"]}
swc_ecma_minifier = {version = "0.21.0", path = "./ecmascript/minifier"}
swc_ecma_parser = {version = "0.66.4", path = "./ecmascript/parser"}
swc_ecma_preset_env = {version = "0.37.0", path = "./ecmascript/preset-env"}
swc_ecma_transforms = {version = "0.66.0", path = "./ecmascript/transforms", features = [
swc_ecma_minifier = {version = "0.22.0", path = "./ecmascript/minifier"}
swc_ecma_parser = {version = "0.67.0", path = "./ecmascript/parser"}
swc_ecma_preset_env = {version = "0.38.0", path = "./ecmascript/preset-env"}
swc_ecma_transforms = {version = "0.67.0", path = "./ecmascript/transforms", features = [
"compat",
"module",
"optimization",
"proposal",
"react",
"typescript",
]}
swc_ecma_transforms_base = {version = "0.26.3", path = "./ecmascript/transforms/base"}
swc_ecma_transforms_base = {version = "0.27.0", path = "./ecmascript/transforms/base"}
swc_ecma_utils = {version = "0.41.2", path = "./ecmascript/utils"}
swc_ecma_visit = {version = "0.35.2", path = "./ecmascript/visit"}
swc_ecmascript = {version = "0.56.0", path = "./ecmascript"}
swc_ecmascript = {version = "0.57.0", path = "./ecmascript"}
swc_node_base = {version = "0.2.2", path = "./node/base"}
swc_visit = {version = "0.2.3", path = "./visit"}

Expand Down
10 changes: 5 additions & 5 deletions bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"]
license = "Apache-2.0/MIT"
name = "swc_bundler"
repository = "https://github.com/swc-project/swc.git"
version = "0.53.0"
version = "0.54.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
Expand All @@ -34,10 +34,10 @@ retain_mut = "0.1.2"
swc_atoms = {version = "0.2.4", path = "../atoms"}
swc_common = {version = "0.11.6", path = "../common"}
swc_ecma_ast = {version = "0.49.4", path = "../ecmascript/ast"}
swc_ecma_codegen = {version = "0.66.3", path = "../ecmascript/codegen"}
swc_ecma_codegen = {version = "0.67.0", path = "../ecmascript/codegen"}
swc_ecma_loader = {version = "0.15.0", path = "../ecmascript/loader"}
swc_ecma_parser = {version = "0.66.4", path = "../ecmascript/parser"}
swc_ecma_transforms = {version = "0.66.0", path = "../ecmascript/transforms", features = ["optimization"]}
swc_ecma_parser = {version = "0.67.0", path = "../ecmascript/parser"}
swc_ecma_transforms = {version = "0.67.0", path = "../ecmascript/transforms", features = ["optimization"]}
swc_ecma_utils = {version = "0.41.2", path = "../ecmascript/utils"}
swc_ecma_visit = {version = "0.35.2", path = "../ecmascript/visit"}

Expand All @@ -46,7 +46,7 @@ hex = "0.4"
ntest = "0.7.2"
reqwest = {version = "0.11.4", features = ["blocking"]}
sha-1 = "0.9"
swc_ecma_transforms = {version = "0.66.0", path = "../ecmascript/transforms", features = ["react", "typescript"]}
swc_ecma_transforms = {version = "0.67.0", path = "../ecmascript/transforms", features = ["react", "typescript"]}
tempfile = "3.1.0"
testing = {version = "0.12.2", path = "../testing"}
url = "2.1.1"
Expand Down
14 changes: 7 additions & 7 deletions ecmascript/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT"
name = "swc_ecmascript"
repository = "https://github.com/swc-project/swc.git"
version = "0.56.0"
version = "0.57.0"

[package.metadata.docs.rs]
all-features = true
Expand All @@ -33,12 +33,12 @@ typescript = ["typescript-parser", "swc_ecma_transforms/typescript"]

[dependencies]
swc_ecma_ast = {version = "0.49.4", path = "./ast"}
swc_ecma_codegen = {version = "0.66.3", path = "./codegen", optional = true}
swc_ecma_dep_graph = {version = "0.34.1", path = "./dep-graph", optional = true}
swc_ecma_minifier = {version = "0.21.0", path = "./minifier", optional = true}
swc_ecma_parser = {version = "0.66.4", path = "./parser", optional = true, default-features = false}
swc_ecma_preset_env = {version = "0.37.0", path = "./preset-env", optional = true}
swc_ecma_transforms = {version = "0.66.0", path = "./transforms", optional = true}
swc_ecma_codegen = {version = "0.67.0", path = "./codegen", optional = true}
swc_ecma_dep_graph = {version = "0.35.0", path = "./dep-graph", optional = true}
swc_ecma_minifier = {version = "0.22.0", path = "./minifier", optional = true}
swc_ecma_parser = {version = "0.67.0", path = "./parser", optional = true, default-features = false}
swc_ecma_preset_env = {version = "0.38.0", path = "./preset-env", optional = true}
swc_ecma_transforms = {version = "0.67.0", path = "./transforms", optional = true}
swc_ecma_utils = {version = "0.41.2", path = "./utils", optional = true}
swc_ecma_visit = {version = "0.35.2", path = "./visit", optional = true}

Expand Down
4 changes: 2 additions & 2 deletions ecmascript/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0/MIT"
name = "swc_ecma_codegen"
repository = "https://github.com/swc-project/swc.git"
version = "0.66.3"
version = "0.67.0"

[dependencies]
bitflags = "1"
Expand All @@ -17,7 +17,7 @@ swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.11.6", path = "../../common"}
swc_ecma_ast = {version = "0.49.4", path = "../ast"}
swc_ecma_codegen_macros = {version = "0.5.2", path = "./macros"}
swc_ecma_parser = {version = "0.66.4", path = "../parser"}
swc_ecma_parser = {version = "0.67.0", path = "../parser"}

[dev-dependencies]
swc_common = {version = "0.11.6", path = "../../common", features = ["sourcemap"]}
Expand Down
4 changes: 2 additions & 2 deletions ecmascript/dep-graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT"
name = "swc_ecma_dep_graph"
repository = "https://github.com/swc-project/swc.git"
version = "0.34.1"
version = "0.35.0"

[dependencies]
swc_atoms = {version = "0.2", path = "../../atoms"}
Expand All @@ -15,5 +15,5 @@ swc_ecma_ast = {version = "0.49.4", path = "../ast"}
swc_ecma_visit = {version = "0.35.2", path = "../visit"}

[dev-dependencies]
swc_ecma_parser = {version = "0.66.4", path = "../parser"}
swc_ecma_parser = {version = "0.67.0", path = "../parser"}
testing = {version = "0.12.2", path = "../../testing"}
4 changes: 2 additions & 2 deletions ecmascript/ext-transforms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/swc_ecma_ext_transforms/"
edition = "2018"
license = "Apache-2.0/MIT"
name = "swc_ecma_ext_transforms"
version = "0.24.1"
version = "0.25.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -14,6 +14,6 @@ phf = {version = "0.8.0", features = ["macros"]}
swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.11.6", path = "../../common"}
swc_ecma_ast = {version = "0.49.4", path = "../ast"}
swc_ecma_parser = {version = "0.66.4", path = "../parser"}
swc_ecma_parser = {version = "0.67.0", path = "../parser"}
swc_ecma_utils = {version = "0.41.2", path = "../utils"}
swc_ecma_visit = {version = "0.35.2", path = "../visit"}
4 changes: 2 additions & 2 deletions ecmascript/jsdoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ documentation = "https://rustdoc.swc.rs/jsdoc/"
edition = "2018"
license = "Apache-2.0/MIT"
name = "jsdoc"
version = "0.34.1"
version = "0.35.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -19,6 +19,6 @@ swc_common = {version = "0.11.6", path = "../../common"}
anyhow = "1"
dashmap = "4.0.2"
swc_ecma_ast = {version = "0.49.4", path = "../ast"}
swc_ecma_parser = {version = "0.66.4", path = "../parser"}
swc_ecma_parser = {version = "0.67.0", path = "../parser"}
testing = {version = "0.12.2", path = "../../testing"}
walkdir = "2"
10 changes: 5 additions & 5 deletions ecmascript/minifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"]
license = "Apache-2.0/MIT"
name = "swc_ecma_minifier"
repository = "https://github.com/swc-project/swc.git"
version = "0.21.1"
version = "0.22.0"

[features]
debug = []
Expand All @@ -27,10 +27,10 @@ serde_regex = "1.1.0"
swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.11.6", path = "../../common"}
swc_ecma_ast = {version = "0.49.4", path = "../ast"}
swc_ecma_codegen = {version = "0.66.3", path = "../codegen"}
swc_ecma_parser = {version = "0.66.4", path = "../parser"}
swc_ecma_transforms = {version = "0.66.0", path = "../transforms/", features = ["optimization"]}
swc_ecma_transforms_base = {version = "0.26.3", path = "../transforms/base"}
swc_ecma_codegen = {version = "0.67.0", path = "../codegen"}
swc_ecma_parser = {version = "0.67.0", path = "../parser"}
swc_ecma_transforms = {version = "0.67.0", path = "../transforms/", features = ["optimization"]}
swc_ecma_transforms_base = {version = "0.27.0", path = "../transforms/base"}
swc_ecma_utils = {version = "0.41.2", path = "../utils"}
swc_ecma_visit = {version = "0.35.2", path = "../visit"}
unicode-xid = "0.2.2"
Expand Down
2 changes: 1 addition & 1 deletion ecmascript/parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"]
license = "Apache-2.0/MIT"
name = "swc_ecma_parser"
repository = "https://github.com/swc-project/swc.git"
version = "0.66.6"
version = "0.67.0"

[package.metadata.docs.rs]
all-features = true
Expand Down
Loading

0 comments on commit 33bdff0

Please sign in to comment.