Skip to content

Commit c87d30b

Browse files
committed
mod(es/parser): Program start at input start
1 parent acca984 commit c87d30b

File tree

644 files changed

+650
-1294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

644 files changed

+650
-1294
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"jsc": {
3+
"parser": {
4+
"syntax": "typescript",
5+
"jsx": false
6+
},
7+
"target": "es2015",
8+
"loose": false,
9+
"minify": {
10+
"compress": false,
11+
"mangle": true
12+
},
13+
"preserveAllComments": true,
14+
"externalHelpers": true
15+
},
16+
"module": {
17+
"type": "es6"
18+
},
19+
"isModule": true
20+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* @ngInject */
2+
class TestClass {
3+
constructor (private testField) {}
4+
}
5+
console.log(123)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { _ as s } from "@swc/helpers/_/_define_property";
2+
/* @ngInject */ class e {
3+
constructor(e){
4+
s(this, "testField", void 0);
5+
this.testField = e;
6+
}
7+
}
8+
console.log(123);

crates/swc/tests/fixture/issues-1xxx/1333/case2/output/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
/*
2-
* Copyright (c) 2020. MeLike2D All Rights Reserved.
3-
* Neo is licensed under the MIT License.
4-
* See the LICENSE file in the project root for more details.
5-
*/ "use strict";
1+
"use strict";
62
Object.defineProperty(exports, "__esModule", {
73
value: true
84
});

crates/swc/tests/fixture/issues-1xxx/1345/output/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** 등록된 계좌+회원의 정보 */ import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
1+
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
22
import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
33
import { _ as _ts_metadata } from "@swc/helpers/_/_ts_metadata";
44
export var AccountMemberView = function AccountMemberView() {

crates/swc/tests/fixture/issues-1xxx/1456/case1/output/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// not work
21
"use strict";
32
Object.defineProperty(exports, "__esModule", {
43
value: true
54
});
65
const _ts_decorate = require("@swc/helpers/_/_ts_decorate");
76
const _ts_metadata = require("@swc/helpers/_/_ts_metadata");
87
const _ts_param = require("@swc/helpers/_/_ts_param");
8+
// not work
99
class MyClass1 {
1010
constructor(param1){
1111
this.param1 = param1;

crates/swc/tests/fixture/issues-1xxx/1456/case2/output/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// work
21
"use strict";
32
Object.defineProperty(exports, "__esModule", {
43
value: true
54
});
65
const _ts_decorate = require("@swc/helpers/_/_ts_decorate");
76
const _ts_metadata = require("@swc/helpers/_/_ts_metadata");
87
const _ts_param = require("@swc/helpers/_/_ts_param");
8+
// work
99
class MyClass1 {
1010
constructor(param1){}
1111
}

crates/swc/tests/fixture/issues-2xxx/2056/1/output/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
2+
import { _ as _type_of } from "@swc/helpers/_/_type_of";
13
/*
24
Copyright (c) 2018-2020 Xiamen Yaji Software Co., Ltd.
35
@@ -24,9 +26,7 @@
2426
*/ /**
2527
* @packageDocumentation
2628
* @module core/math
27-
*/ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
28-
import { _ as _type_of } from "@swc/helpers/_/_type_of";
29-
import { CCClass } from "../data/class";
29+
*/ import { CCClass } from "../data/class";
3030
import { Mat3 } from "./mat3";
3131
import { Quat } from "./quat";
3232
import { enumerableProps, EPSILON } from "./utils";

crates/swc/tests/fixture/issues-2xxx/2964/case-3/output/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// single line comment
21
"use strict";
32
Object.defineProperty(exports, "__esModule", {
43
value: true
54
});
65
const _object_without_properties = require("@swc/helpers/_/_object_without_properties");
6+
// single line comment
77
const x = (_param)=>/*todo: refactor any type*/ {
88
var { y } = _param, rest = _object_without_properties._(_param, [
99
"y"

crates/swc/tests/fixture/issues-3xxx/3067/amd/output/packages/c/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Simulate accessing a .js file in a third party package that shouldn't be edited
21
define([
32
"require",
43
"exports",

0 commit comments

Comments
 (0)