file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
crates/swc_ecma_transforms_macros/src/fast.rs
Rust
use proc_macro2::TokenStream; use quote::quote; use swc_macros_common::call_site; use syn::{parse_quote, FnArg, Ident, ImplItem, ImplItemFn, ItemImpl, Pat, Path}; use crate::common::Mode; pub fn expand(attr: TokenStream, item: ItemImpl) -> ItemImpl { let expander = Expander { handler: syn::parse2(attr).ex...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_macros/src/lib.rs
Rust
#![deny(clippy::all)] #![recursion_limit = "2048"] use proc_macro::TokenStream; use quote::ToTokens; use swc_macros_common::print; mod common; mod fast; mod parallel; /// This macro adds fast-path to the `swc_ecma_visit::Fold` and /// `swc_ecma_visit::Visit`. /// /// Currently this macro modifies handler of `Expr`, ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_macros/src/parallel.rs
Rust
#![allow(non_snake_case)] use proc_macro2::{Span, TokenStream}; use syn::{parse_quote, Expr, Ident, ImplItem, ImplItemFn, ItemImpl, Meta, Type}; use crate::common::Mode; pub fn expand(attr: TokenStream, mut item: ItemImpl) -> ItemImpl { let mode = { let p = &item.trait_.as_ref().unwrap().1; if p....
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/amd.rs
Rust
use anyhow::Context; use regex::Regex; use serde::{Deserialize, Serialize}; use swc_atoms::Atom; use swc_common::{ comments::{CommentKind, Comments}, source_map::PURE_SP, util::take::Take, Mark, Span, SyntaxContext, DUMMY_SP, }; use swc_ecma_ast::*; use swc_ecma_transforms_base::{feature::FeatureFlag, h...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/common_js.rs
Rust
use rustc_hash::FxHashSet; use swc_common::{source_map::PURE_SP, util::take::Take, Mark, Span, SyntaxContext, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_transforms_base::{feature::FeatureFlag, helper_expr}; use swc_ecma_utils::{ member_expr, private_ident, quote_expr, quote_ident, ExprFactory, FunctionFactory, Is...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/import_analysis.rs
Rust
use rustc_hash::FxHashMap; use swc_atoms::Atom; use swc_ecma_ast::*; use swc_ecma_transforms_base::enable_helper; use swc_ecma_visit::{ noop_visit_mut_type, noop_visit_type, visit_mut_pass, Visit, VisitMut, VisitWith, }; use crate::{module_decl_strip::LinkFlag, util::ImportInterop}; pub fn import_analyzer(import_...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/lib.rs
Rust
#![deny(clippy::all)] #![allow(clippy::needless_lifetimes)] #![allow(clippy::vec_box)] #![allow(clippy::mutable_key_type)] use serde::{Deserialize, Serialize}; use swc_common::{Span, SyntaxContext}; use util::Config; pub use self::{amd::amd, common_js::common_js, system_js::system_js, umd::umd}; #[macro_use] pub mod...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/module_decl_strip.rs
Rust
use indexmap::IndexMap; use rustc_hash::{FxHashMap, FxHashSet}; use swc_atoms::Atom; use swc_common::{util::take::Take, Mark, Span, SyntaxContext}; use swc_ecma_ast::*; use swc_ecma_utils::{find_pat_ids, private_ident, quote_ident, ExprFactory}; use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith}; use cr...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/module_ref_rewriter.rs
Rust
use rustc_hash::{FxHashMap, FxHashSet}; use swc_atoms::Atom; use swc_common::SyntaxContext; use swc_ecma_ast::*; use swc_ecma_transforms_base::helpers::HELPERS; use swc_ecma_utils::{ExprFactory, QueryRef, RefRewriter}; use swc_ecma_visit::VisitMutWith; use crate::util::prop_name; pub type ImportMap = FxHashMap<Id, (I...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/path.rs
Rust
use std::{ borrow::Cow, env::current_dir, fs::canonicalize, io, path::{Component, Path, PathBuf}, sync::Arc, }; use anyhow::{anyhow, Context, Error}; use path_clean::PathClean; use pathdiff::diff_paths; use swc_atoms::Atom; use swc_common::{FileName, Mark, Span, SyntaxContext, DUMMY_SP}; use sw...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/rewriter.rs
Rust
use std::sync::Arc; use anyhow::Context; use swc_common::FileName; use swc_ecma_ast::*; use swc_ecma_visit::{visit_mut_pass, VisitMut, VisitMutWith}; use crate::path::ImportResolver; /// Import rewriter, which rewrites imports as es modules. pub fn import_rewriter(base: FileName, resolver: Arc<dyn ImportResolver>) -...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/system_js.rs
Rust
use anyhow::Context; use rustc_hash::FxHashMap; use serde::{Deserialize, Serialize}; use swc_atoms::Atom; use swc_common::{Mark, Span, SyntaxContext, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_utils::{ member_expr, private_ident, quote_ident, quote_str, var::VarCollector, ExprFactory, }; use swc_ecma_visit::{fold...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/top_level_this.rs
Rust
use swc_ecma_ast::*; use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith}; pub struct TopLevelThis { found: bool, this: Expr, } pub(crate) fn top_level_this<V>(node: &mut V, replace_with: Expr) -> bool where V: VisitMutWith<TopLevelThis>, { let mut v = TopLevelThis { this: replace...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/umd.rs
Rust
use anyhow::Context; use swc_atoms::Atom; use swc_common::{ source_map::PURE_SP, sync::Lrc, util::take::Take, Mark, SourceMap, Span, SyntaxContext, DUMMY_SP, }; use swc_ecma_ast::*; use swc_ecma_transforms_base::{feature::FeatureFlag, helper_expr}; use swc_ecma_utils::{ is_valid_prop_ident, private_ident, q...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/umd/config.rs
Rust
use std::collections::HashMap; use inflector::Inflector; use serde::{Deserialize, Serialize}; use swc_atoms::Atom; use swc_common::{errors::HANDLER, sync::Lrc, FileName, SourceMap}; use swc_ecma_ast::{Expr, Ident}; use swc_ecma_parser::{parse_file_as_expr, Syntax}; use swc_ecma_utils::quote_ident; use super::super::u...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/src/util.rs
Rust
use is_macro::Is; use serde::{Deserialize, Serialize}; use swc_atoms::Atom; use swc_cached::regex::CachedRegex; use swc_common::DUMMY_SP; use swc_ecma_ast::*; use swc_ecma_utils::{ is_valid_prop_ident, member_expr, private_ident, quote_ident, quote_str, ExprFactory, FunctionFactory, IsDirective, }; use crate::...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/amd.rs/for_of_as_array_for_of_import_amd.js
JavaScript
define([ "require", "exports", "foo" ], function(require, exports, _foo) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); for(let _i = 0; _i < _foo.array.length; _i++){ const elm = _foo.array[_i]; console.log(elm); } });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/common_js.rs/for_of_as_array_for_of_import_commonjs.js
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _foo = require("foo"); for(let _i = 0; _i < _foo.array.length; _i++){ const elm = _foo.array[_i]; console.log(elm); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/system_js.rs/allow_continuous_assignment.js
JavaScript
System.register([], function(_export, _context) { "use strict"; var e; return { setters: [], execute: function() { e = {}; e.a = e.b = e.c = e.d = e.e = e.f = e.g = e.h = e.i = e.j = e.k = e.l = e.m = e.n = e.o = e.p = e.q = e.r = e.s = e.t = e.u = e.v = e.w = e.x = e...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/system_js.rs/allow_top_level_this_false.js
JavaScript
System.register([], function(_export, _context) { "use strict"; var v; function a() { function d() {} var b = this; } return { setters: [], execute: function() { _export("v", v = void 0); } }; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/system_js.rs/allow_top_level_this_true.js
JavaScript
System.register([], function(_export, _context) { "use strict"; var v; return { setters: [], execute: function() { _export("v", v = this); } }; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/system_js.rs/iife.js
JavaScript
System.register([], function(_export, _context) { "use strict"; return { setters: [], execute: function() { (function(a) { this.foo = a; })(void 0); } }; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/system_js.rs/imports.js
JavaScript
System.register([], function(_export, _context) { "use strict"; return { setters: [], execute: async function() { _context.meta.url; _context.meta.fn(); await _context.import('./test2'); } }; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/__swc_snapshots__/tests/system_js.rs/top_level_this_false_class.js
JavaScript
System.register([], function(_export, _context) { "use strict"; var A, a; return { setters: [], execute: function() { a = void 0; A = class A { constructor(){ this.a = 1; } test() { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/amd.rs
Rust
use std::{fs::File, path::PathBuf, rc::Rc}; use swc_common::{comments::SingleThreadedComments, Mark}; use swc_ecma_ast::Pass; use swc_ecma_parser::{Syntax, TsSyntax}; use swc_ecma_transforms_base::{feature::FeatureFlag, resolver}; use swc_ecma_transforms_compat::es2015::for_of; use swc_ecma_transforms_module::amd::{se...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/common_js.rs
Rust
use std::{fs::File, path::PathBuf}; use swc_common::Mark; use swc_ecma_ast::Pass; use swc_ecma_parser::{Syntax, TsSyntax}; use swc_ecma_transforms_base::{feature::FeatureFlag, resolver}; use swc_ecma_transforms_compat::es2015::for_of; use swc_ecma_transforms_module::common_js::{self, common_js}; use swc_ecma_transform...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture-manual/issue-4730/input/src/index.js
JavaScript
import { displayB } from "@print/b"; async function display() { const displayA = await import("@print/a").then((c) => c.displayA); console.log(displayA()); console.log(displayB()); } display();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture-manual/issue-4730/output/index.js
JavaScript
import { displayB } from "../packages/b/src/index.js"; async function display() { const displayA = await import("../packages/a/src/index.js").then((c)=>c.displayA); console.log(displayA()); console.log(displayB()); } display();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/false/input.js
JavaScript
export var v = this;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/false/output.amd.js
JavaScript
define([ "require", "exports" ], function(require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "v", { enumerable: true, get: function() { return v; } }); var v = void 0;...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/false/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "v", { enumerable: true, get: function() { return v; } }); var v = void 0;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/false/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports); else if (typeof define === "function" && define.amd) define([ "exports" ], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(glo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/true/input.js
JavaScript
export var v = this;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/true/output.amd.js
JavaScript
define([ "require", "exports" ], function(require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "v", { enumerable: true, get: function() { return v; } }); var v = this; }...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/true/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "v", { enumerable: true, get: function() { return v; } }); var v = this;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/allow-top-level-this/true/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports); else if (typeof define === "function" && define.amd) define([ "exports" ], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(glo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/1/input.ts
TypeScript
///<amd-module name='NamedModule'/> class Foo { x: number; constructor() { this.x = 5; } } export = Foo;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/1/output.amd.ts
TypeScript
///<amd-module name='NamedModule'/> define("NamedModule", [ "require" ], function(require) { "use strict"; class Foo { x; constructor(){ this.x = 5; } } module.exports = Foo; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/1/output.umd.ts
TypeScript
///<amd-module name='NamedModule'/> (function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) facto...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/2/input.ts
TypeScript
///<amd-module name='FirstModuleName'/> ///<amd-module name='SecondModuleName'/> class Foo { x: number; constructor() { this.x = 5; } } export = Foo;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/2/output.amd.ts
TypeScript
///<amd-module name='FirstModuleName'/> ///<amd-module name='SecondModuleName'/> define("SecondModuleName", [ "require" ], function(require) { "use strict"; class Foo { x; constructor(){ this.x = 5; } } module.exports = Foo; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/2/output.umd.ts
TypeScript
///<amd-module name='FirstModuleName'/> ///<amd-module name='SecondModuleName'/> (function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "un...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/3/input.ts
TypeScript
///<AmD-moDulE nAme='NamedModule'/> class Foo { x: number; constructor() { this.x = 5; } } export = Foo;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/3/output.amd.ts
TypeScript
///<AmD-moDulE nAme='NamedModule'/> define("NamedModule", [ "require" ], function(require) { "use strict"; class Foo { x; constructor(){ this.x = 5; } } module.exports = Foo; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/3/output.umd.ts
TypeScript
///<AmD-moDulE nAme='NamedModule'/> (function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) facto...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/4/input.ts
TypeScript
/*/<amd-module name='should-ignore'/> */ class Foo { x: number; constructor() { this.x = 5; } } export = Foo;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/4/output.amd.ts
TypeScript
/*/<amd-module name='should-ignore'/> */ define([ "require" ], function(require) { "use strict"; class Foo { x; constructor(){ this.x = 5; } } module.exports = Foo; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/amd-triple-slash-directive/4/output.umd.ts
TypeScript
/*/<amd-module name='should-ignore'/> */ (function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/live-rewrite/input.js
JavaScript
import { test1, test2, test3, test4, test5, test6, test7, test8, test9, } from "anywhere"; class Example { #test1 = test1; test2 = test2; #test3() { return test3; } test4() { return test4; } get #test5() { return test5; } g...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/live-rewrite/output.amd.js
JavaScript
define([ "require", "exports", "anywhere" ], function(require, exports, _anywhere) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Example { #test1 = _anywhere.test1; test2 = _anywhere.test2; #test3() { return _...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/live-rewrite/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _anywhere = require("anywhere"); class Example { #test1 = _anywhere.test1; test2 = _anywhere.test2; #test3() { return _anywhere.test3; } test4() { return _anywhere.test4; } get #test5() { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/live-rewrite/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("anywhere")); else if (typeof define === "function" && define.amd) define([ "exports", "anywhere" ], factory); else if (global = typeof globalThis !== "undefined" ?...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private-method/input.js
JavaScript
class Example { #method() { console.log(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private-method/output.amd.js
JavaScript
define([ "require" ], function(require) { "use strict"; class Example { #method() { console.log(this); } } });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private-method/output.cjs
JavaScript
"use strict"; class Example { #method() { console.log(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private-method/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(); })(this, function() { "use...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private/input.js
JavaScript
class Example { #property = this; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private/output.amd.js
JavaScript
define([ "require" ], function(require) { "use strict"; class Example { #property = this; } });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private/output.cjs
JavaScript
"use strict"; class Example { #property = this; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/private/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(); })(this, function() { "use...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/public/input.js
JavaScript
class Example { property = this; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/public/output.amd.js
JavaScript
define([ "require" ], function(require) { "use strict"; class Example { property = this; } });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/public/output.cjs
JavaScript
"use strict"; class Example { property = this; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-properties/public/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(); })(this, function() { "use...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-property/input.js
JavaScript
import { a } from "./files_with_swcrc/simple"; export class Foo { static prop = a; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-property/output.amd.js
JavaScript
define([ "require", "exports", "./files_with_swcrc/simple" ], function(require, exports, _simple) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Foo", { enumerable: true, get: function() { ret...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-property/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Foo", { enumerable: true, get: function() { return Foo; } }); const _simple = require("./files_with_swcrc/simple"); class Foo { static prop = _simple.a; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/class-property/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("./files_with_swcrc/simple")); else if (typeof define === "function" && define.amd) define([ "exports", "./files_with_swcrc/simple" ], factory); else if (global = t...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/cts-import-export/export-assign/output.amd.ts
TypeScript
define([ "require" ], function(require) { "use strict"; const foo = require("foo"); module.exports = foo; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/cts-import-export/export-assign/output.umd.ts
TypeScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(); })(this, function() { "use...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/cts-import-export/export-import/output.amd.ts
TypeScript
define([ "require" ], function(require) { "use strict"; const foo = exports.foo = require("foo"); });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/cts-import-export/export-import/output.umd.ts
TypeScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(); else if (typeof define === "function" && define.amd) define([], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(); })(this, function() { "use...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/cts-import-export/mixed/output.amd.ts
TypeScript
define([ "require", "exports", "foo" ], function(require, exports, _foo) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); _foo = /*#__PURE__*/ _interop_require_default(_foo); const bar = require("foo"); (0, _foo.default)(); bar(); });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/cts-import-export/mixed/output.umd.ts
TypeScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("foo")); else if (typeof define === "function" && define.amd) define([ "exports", "foo" ], factory); else if (global = typeof globalThis !== "undefined" ? globalThi...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/01/input.js
JavaScript
var foo = 1; export var foo = 2; foo = 3;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/01/output.amd.js
JavaScript
define([ "require", "exports" ], function(require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "foo", { enumerable: true, get: function() { return foo; } }); var foo = 1...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/01/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "foo", { enumerable: true, get: function() { return foo; } }); var foo = 1; var foo = 2; foo = 3;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/01/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports); else if (typeof define === "function" && define.amd) define([ "exports" ], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(glo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/02/input.js
JavaScript
export const good = { a(bad1) { ((...bad2) => {}); }, };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/02/output.amd.js
JavaScript
define([ "require", "exports" ], function(require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "good", { enumerable: true, get: function() { return good; } }); const goo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/02/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "good", { enumerable: true, get: function() { return good; } }); const good = { a (bad1) { (...bad2)=>{}; } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/02/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports); else if (typeof define === "function" && define.amd) define([ "exports" ], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(glo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/named-define/input.js
JavaScript
import { foo } from "src"; export { foo };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/named-define/output.amd.js
JavaScript
define("moduleId", [ "require", "exports", "src" ], function(require, exports, _src) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "foo", { enumerable: true, get: function() { return _src.foo;...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/named-define/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "foo", { enumerable: true, get: function() { return _src.foo; } }); const _src = require("src");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/named-define/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("src")); else if (typeof define === "function" && define.amd) define([ "exports", "src" ], factory); else if (global = typeof globalThis !== "undefined" ? globalThi...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/non-strict-mode/input.js
JavaScript
export function foo() {}
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/non-strict-mode/output.amd.js
JavaScript
define([ "require", "exports" ], function(require, exports) { Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "foo", { enumerable: true, get: function() { return foo; } }); function foo() {} });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/non-strict-mode/output.cjs
JavaScript
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "foo", { enumerable: true, get: function() { return foo; } }); function foo() {}
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/non-strict-mode/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports); else if (typeof define === "function" && define.amd) define([ "exports" ], factory); else if (global = typeof globalThis !== "undefined" ? globalThis : global || self) factory(glo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/usage/input.js
JavaScript
import React from "react"; window.React = React;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/usage/output.amd.js
JavaScript
define([ "require", "exports", "react" ], function(require, exports, _react) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); _react = /*#__PURE__*/ _interop_require_default(_react); window.React = _react.default; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/usage/output.cjs
JavaScript
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _react = /*#__PURE__*/ _interop_require_default(require("react")); window.React = _react.default;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/custom/usage/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("react")); else if (typeof define === "function" && define.amd) define([ "exports", "react" ], factory); else if (global = typeof globalThis !== "undefined" ? globa...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/disable-strict-mode-strict-mode-false/input.js
JavaScript
import "foo"; import "foo-bar"; import "./directory/foo-bar";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/disable-strict-mode-strict-mode-false/output.amd.js
JavaScript
define([ "require", "exports", "foo", "foo-bar", "./directory/foo-bar" ], function(require, exports, _foo, _foobar, _foobar1) { Object.defineProperty(exports, "__esModule", { value: true }); });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/disable-strict-mode-strict-mode-false/output.cjs
JavaScript
Object.defineProperty(exports, "__esModule", { value: true }); require("foo"); require("foo-bar"); require("./directory/foo-bar");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/disable-strict-mode-strict-mode-false/output.umd.js
JavaScript
(function(global, factory) { if (typeof module === "object" && typeof module.exports === "object") factory(exports, require("foo"), require("foo-bar"), require("./directory/foo-bar")); else if (typeof define === "function" && define.amd) define([ "exports", "foo", "foo-bar", "./d...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/export-interop-annotation/input.js
JavaScript
export function useRouter() {} export default useRouter;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_module/tests/fixture/common/export-interop-annotation/output.amd.js
JavaScript
define([ "require", "exports" ], function(require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University