Skip to content

Commit

Permalink
fix(bundler): Prepare renaming of bundler (#2066)
Browse files Browse the repository at this point in the history
- Rename `spack` crate to `swc_node_bundler`. (#1113)
  • Loading branch information
kdy1 authored Aug 13, 2021
1 parent fe2a063 commit 883c1ac
Show file tree
Hide file tree
Showing 739 changed files with 1,007 additions and 1,843 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ jobs:
- from_variant
- jsdoc
- node
- spack
- string_enum
- swc
- swc_atoms
Expand Down Expand Up @@ -138,14 +137,15 @@ jobs:
- swc_eq_ignore_macros
- swc_macros_common
- swc_node_base
- swc_node_bundler
- swc_visit
- swc_visit_macros
- testing
- testing_macros
- wasm
exclude:
- os: windows-latest
crate: spack
crate: swc_node_bundler

steps:
- name: Handle line endings
Expand Down Expand Up @@ -232,10 +232,9 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-03-30

- name: Create rustdoc
run: cargo +nightly-2021-03-30 doc
run: cargo doc

- name: Create CNAME
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ jobs:
- name: (spack) example react app
run: |
export PATH="$PATH:$HOME/npm/bin"
(cd spack/tests/integration/react && npm i && npx spack)
(cd node/bundler/tests/integration/react && npm i && npx spack)
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ common
CONTRIBUTING.md
ecmascript
macros
node
node-swc
scripts
spack
Expand Down
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
format_strings = true
merge_imports = true
use_field_init_shorthand = true
wrap_comments = true
70 changes: 35 additions & 35 deletions Cargo.lock

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

12 changes: 4 additions & 8 deletions babel/compat/benches/babelify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@

extern crate test;

use std::io::stderr;
use std::{hint::black_box, sync::Arc};
use swc_babel_compat::babelify::Babelify;
use swc_babel_compat::babelify::Context;
use swc_common::SourceFile;
use swc_common::{errors::Handler, FileName, FilePathMapping, SourceMap};
use std::{hint::black_box, io::stderr, sync::Arc};
use swc_babel_compat::babelify::{Babelify, Context};
use swc_common::{errors::Handler, FileName, FilePathMapping, SourceFile, SourceMap};
use swc_ecma_ast::Program;
use swc_ecma_parser::{JscTarget, Syntax};
use swc_ecma_transforms::compat::es2020;
use swc_ecma_transforms::typescript;
use swc_ecma_transforms::{compat::es2020, typescript};
use swc_ecma_visit::FoldWith;
use test::Bencher;

Expand Down
4 changes: 1 addition & 3 deletions babel/compat/src/babelify/class.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use crate::babelify::extract_class_body_span;
use crate::babelify::Babelify;
use crate::babelify::Context;
use crate::babelify::{extract_class_body_span, Babelify, Context};
use copyless::BoxHelper;
use serde_json::value::Value;
use swc_babel_ast::{
Expand Down
15 changes: 6 additions & 9 deletions babel/compat/src/babelify/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
use rayon::prelude::*;
use serde::de::DeserializeOwned;
use serde::Serialize;
use serde::{de::DeserializeOwned, Serialize};
use std::sync::Arc;
use swc::SwcComments;
use swc_babel_ast::{BaseComment, BaseNode, Comment, LineCol, Loc};
use swc_common::comments::CommentKind;
use swc_common::comments::Comments;
use swc_common::sync::Lrc;
use swc_common::BytePos;
use swc_common::SourceFile;
use swc_common::SourceMap;
use swc_common::Span;
use swc_common::{
comments::{CommentKind, Comments},
sync::Lrc,
BytePos, SourceFile, SourceMap, Span,
};
use swc_ecma_ast::Class;

mod class;
Expand Down
3 changes: 1 addition & 2 deletions babel/compat/src/babelify/typescript.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::babelify::{Babelify, Context};
use copyless::BoxHelper;
use swc_atoms::js_word;
use swc_atoms::JsWord;
use swc_atoms::{js_word, JsWord};
use swc_babel_ast::{
Access, ArrayPattern, IdOrRest, IdOrString, Identifier, ObjectPattern, RestElement,
TSAnyKeyword, TSArrayType, TSAsExpression, TSBigIntKeyword, TSBooleanKeyword,
Expand Down
14 changes: 4 additions & 10 deletions babel/compat/src/swcify/class.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
use super::Context;
use crate::swcify::Swcify;
use swc_babel_ast::ClassBody;
use swc_babel_ast::ClassBodyEl;
use swc_babel_ast::ClassImpl;
use swc_babel_ast::ClassMethodKind;
use swc_babel_ast::TSExpressionWithTypeArguments;
use swc_ecma_ast::ClassMember;
use swc_ecma_ast::Function;
use swc_ecma_ast::MethodKind;
use swc_ecma_ast::ParamOrTsParamProp;
use swc_ecma_ast::TsExprWithTypeArgs;
use swc_babel_ast::{
ClassBody, ClassBodyEl, ClassImpl, ClassMethodKind, TSExpressionWithTypeArguments,
};
use swc_ecma_ast::{ClassMember, Function, MethodKind, ParamOrTsParamProp, TsExprWithTypeArgs};
use swc_ecma_utils::prop_name_to_expr;

impl Swcify for ClassBody {
Expand Down
12 changes: 2 additions & 10 deletions babel/compat/src/swcify/ctx.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
use std::sync::Arc;
use swc::SwcComments;
use swc_babel_ast::BaseNode;
use swc_babel_ast::LineCol;
use swc_babel_ast::Loc;
use swc_common::BytePos;
use swc_common::FileName;
use swc_common::SourceFile;
use swc_common::SourceMap;
use swc_common::Span;
use swc_common::SyntaxContext;
use swc_common::DUMMY_SP;
use swc_babel_ast::{BaseNode, LineCol, Loc};
use swc_common::{BytePos, FileName, SourceFile, SourceMap, Span, SyntaxContext, DUMMY_SP};

pub struct Context {
#[allow(unused)]
Expand Down
Loading

0 comments on commit 883c1ac

Please sign in to comment.