ts-swc-transform 2.0.17 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,6 @@ function createMatcher(tsConfig) {
|
|
|
26
26
|
var pattern = (0, _unixify.default)(condition);
|
|
27
27
|
if (!_pathposix.default.isAbsolute(pattern) && !pattern.startsWith('*')) pattern = _pathposix.default.join(tsconfigPath, pattern);
|
|
28
28
|
return function match(filePath) {
|
|
29
|
-
// @ts-ignore
|
|
30
29
|
return filePath.startsWith(pattern) || (0, _minimatch.default)(filePath, pattern);
|
|
31
30
|
};
|
|
32
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import type { TsConfigResult } from 'get-tsconfig-compat';\nimport minimatch from 'minimatch';\nimport path from 'path-posix';\nimport unixify from 'unixify';\nimport loadTsConfig from './loadTsConfig.js';\nimport type { Matcher } from './types.js';\n\nexport default function createMatcher(tsConfig: TsConfigResult): Matcher {\n const tsconfig = loadTsConfig({ tsconfig: tsConfig }, 'transformTypes');\n const tsconfigPath = path.dirname(unixify(tsconfig.path));\n\n function matchFn(condition) {\n let pattern = unixify(condition);\n if (!path.isAbsolute(pattern) && !pattern.startsWith('*')) pattern = path.join(tsconfigPath, pattern);\n\n return function match(filePath) {\n
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import type { TsConfigResult } from 'get-tsconfig-compat';\nimport minimatch from 'minimatch';\nimport path from 'path-posix';\nimport unixify from 'unixify';\nimport loadTsConfig from './loadTsConfig.js';\nimport type { Matcher } from './types.js';\n\nexport default function createMatcher(tsConfig: TsConfigResult): Matcher {\n const tsconfig = loadTsConfig({ tsconfig: tsConfig }, 'transformTypes');\n const tsconfigPath = path.dirname(unixify(tsconfig.path));\n\n function matchFn(condition) {\n let pattern = unixify(condition);\n if (!path.isAbsolute(pattern) && !pattern.startsWith('*')) pattern = path.join(tsconfigPath, pattern);\n\n return function match(filePath) {\n return filePath.startsWith(pattern) || minimatch(filePath, pattern);\n };\n }\n\n const includes = (tsconfig.config.include || []).map(matchFn);\n const excludes = (tsconfig.config.exclude || []).map(matchFn);\n\n return function matcher(filePath) {\n if (filePath.endsWith('.json')) return false;\n\n filePath = unixify(filePath);\n for (let i = 0; i < excludes.length; ++i) {\n if (excludes[i](filePath)) return false;\n }\n for (let j = 0; j < includes.length; ++j) {\n if (includes[j](filePath)) return true;\n }\n return !includes.length;\n };\n}\n"],"names":["createMatcher","tsConfig","tsconfig","loadTsConfig","tsconfigPath","path","dirname","unixify","matchFn","condition","pattern","isAbsolute","startsWith","join","match","filePath","minimatch","includes","config","include","map","excludes","exclude","matcher","endsWith","i","length","j"],"mappings":";;;;+BAOA;;;eAAwBA;;;gEANF;gEACL;8DACG;mEACK;;;;;;AAGV,SAASA,cAAcC,QAAwB;IAC5D,IAAMC,WAAWC,IAAAA,qBAAY,EAAC;QAAED,UAAUD;IAAS,GAAG;IACtD,IAAMG,eAAeC,kBAAI,CAACC,OAAO,CAACC,IAAAA,gBAAO,EAACL,SAASG,IAAI;IAEvD,SAASG,QAAQC,SAAS;QACxB,IAAIC,UAAUH,IAAAA,gBAAO,EAACE;QACtB,IAAI,CAACJ,kBAAI,CAACM,UAAU,CAACD,YAAY,CAACA,QAAQE,UAAU,CAAC,MAAMF,UAAUL,kBAAI,CAACQ,IAAI,CAACT,cAAcM;QAE7F,OAAO,SAASI,MAAMC,QAAQ;YAC5B,OAAOA,SAASH,UAAU,CAACF,YAAYM,IAAAA,kBAAS,EAACD,UAAUL;QAC7D;IACF;IAEA,IAAMO,WAAW,AAACf,CAAAA,SAASgB,MAAM,CAACC,OAAO,IAAI,EAAE,AAAD,EAAGC,GAAG,CAACZ;IACrD,IAAMa,WAAW,AAACnB,CAAAA,SAASgB,MAAM,CAACI,OAAO,IAAI,EAAE,AAAD,EAAGF,GAAG,CAACZ;IAErD,OAAO,SAASe,QAAQR,QAAQ;QAC9B,IAAIA,SAASS,QAAQ,CAAC,UAAU,OAAO;QAEvCT,WAAWR,IAAAA,gBAAO,EAACQ;QACnB,IAAK,IAAIU,IAAI,GAAGA,IAAIJ,SAASK,MAAM,EAAE,EAAED,EAAG;YACxC,IAAIJ,QAAQ,CAACI,EAAE,CAACV,WAAW,OAAO;QACpC;QACA,IAAK,IAAIY,IAAI,GAAGA,IAAIV,SAASS,MAAM,EAAE,EAAEC,EAAG;YACxC,IAAIV,QAAQ,CAACU,EAAE,CAACZ,WAAW,OAAO;QACpC;QACA,OAAO,CAACE,SAASS,MAAM;IACzB;AACF"}
|
|
@@ -11,7 +11,6 @@ export default function createMatcher(tsConfig) {
|
|
|
11
11
|
let pattern = unixify(condition);
|
|
12
12
|
if (!path.isAbsolute(pattern) && !pattern.startsWith('*')) pattern = path.join(tsconfigPath, pattern);
|
|
13
13
|
return function match(filePath) {
|
|
14
|
-
// @ts-ignore
|
|
15
14
|
return filePath.startsWith(pattern) || minimatch(filePath, pattern);
|
|
16
15
|
};
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import type { TsConfigResult } from 'get-tsconfig-compat';\nimport minimatch from 'minimatch';\nimport path from 'path-posix';\nimport unixify from 'unixify';\nimport loadTsConfig from './loadTsConfig.js';\nimport type { Matcher } from './types.js';\n\nexport default function createMatcher(tsConfig: TsConfigResult): Matcher {\n const tsconfig = loadTsConfig({ tsconfig: tsConfig }, 'transformTypes');\n const tsconfigPath = path.dirname(unixify(tsconfig.path));\n\n function matchFn(condition) {\n let pattern = unixify(condition);\n if (!path.isAbsolute(pattern) && !pattern.startsWith('*')) pattern = path.join(tsconfigPath, pattern);\n\n return function match(filePath) {\n
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import type { TsConfigResult } from 'get-tsconfig-compat';\nimport minimatch from 'minimatch';\nimport path from 'path-posix';\nimport unixify from 'unixify';\nimport loadTsConfig from './loadTsConfig.js';\nimport type { Matcher } from './types.js';\n\nexport default function createMatcher(tsConfig: TsConfigResult): Matcher {\n const tsconfig = loadTsConfig({ tsconfig: tsConfig }, 'transformTypes');\n const tsconfigPath = path.dirname(unixify(tsconfig.path));\n\n function matchFn(condition) {\n let pattern = unixify(condition);\n if (!path.isAbsolute(pattern) && !pattern.startsWith('*')) pattern = path.join(tsconfigPath, pattern);\n\n return function match(filePath) {\n return filePath.startsWith(pattern) || minimatch(filePath, pattern);\n };\n }\n\n const includes = (tsconfig.config.include || []).map(matchFn);\n const excludes = (tsconfig.config.exclude || []).map(matchFn);\n\n return function matcher(filePath) {\n if (filePath.endsWith('.json')) return false;\n\n filePath = unixify(filePath);\n for (let i = 0; i < excludes.length; ++i) {\n if (excludes[i](filePath)) return false;\n }\n for (let j = 0; j < includes.length; ++j) {\n if (includes[j](filePath)) return true;\n }\n return !includes.length;\n };\n}\n"],"names":["minimatch","path","unixify","loadTsConfig","createMatcher","tsConfig","tsconfig","tsconfigPath","dirname","matchFn","condition","pattern","isAbsolute","startsWith","join","match","filePath","includes","config","include","map","excludes","exclude","matcher","endsWith","i","length","j"],"mappings":"AACA,OAAOA,eAAe,YAAY;AAClC,OAAOC,UAAU,aAAa;AAC9B,OAAOC,aAAa,UAAU;AAC9B,OAAOC,kBAAkB,oBAAoB;AAG7C,eAAe,SAASC,cAAcC,QAAwB;IAC5D,MAAMC,WAAWH,aAAa;QAAEG,UAAUD;IAAS,GAAG;IACtD,MAAME,eAAeN,KAAKO,OAAO,CAACN,QAAQI,SAASL,IAAI;IAEvD,SAASQ,QAAQC,SAAS;QACxB,IAAIC,UAAUT,QAAQQ;QACtB,IAAI,CAACT,KAAKW,UAAU,CAACD,YAAY,CAACA,QAAQE,UAAU,CAAC,MAAMF,UAAUV,KAAKa,IAAI,CAACP,cAAcI;QAE7F,OAAO,SAASI,MAAMC,QAAQ;YAC5B,OAAOA,SAASH,UAAU,CAACF,YAAYX,UAAUgB,UAAUL;QAC7D;IACF;IAEA,MAAMM,WAAW,AAACX,CAAAA,SAASY,MAAM,CAACC,OAAO,IAAI,EAAE,AAAD,EAAGC,GAAG,CAACX;IACrD,MAAMY,WAAW,AAACf,CAAAA,SAASY,MAAM,CAACI,OAAO,IAAI,EAAE,AAAD,EAAGF,GAAG,CAACX;IAErD,OAAO,SAASc,QAAQP,QAAQ;QAC9B,IAAIA,SAASQ,QAAQ,CAAC,UAAU,OAAO;QAEvCR,WAAWd,QAAQc;QACnB,IAAK,IAAIS,IAAI,GAAGA,IAAIJ,SAASK,MAAM,EAAE,EAAED,EAAG;YACxC,IAAIJ,QAAQ,CAACI,EAAE,CAACT,WAAW,OAAO;QACpC;QACA,IAAK,IAAIW,IAAI,GAAGA,IAAIV,SAASS,MAAM,EAAE,EAAEC,EAAG;YACxC,IAAIV,QAAQ,CAACU,EAAE,CAACX,WAAW,OAAO;QACpC;QACA,OAAO,CAACC,SAASS,MAAM;IACzB;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-swc-transform",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"description": "Typescript transformers for swc. Supports Node >= 0.8",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"matcher",
|
|
@@ -38,24 +38,24 @@
|
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsds build",
|
|
40
40
|
"format": "biome check --write --unsafe",
|
|
41
|
-
"test": "
|
|
42
|
-
"test:engines": "nvu engines
|
|
41
|
+
"test": "mocha --no-timeouts test/**/*.test.*",
|
|
42
|
+
"test:engines": "nvu engines tsds test:node --no-timeouts",
|
|
43
43
|
"version": "tsds version"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@swc/core": "*",
|
|
47
47
|
"core-js-pure": "*",
|
|
48
48
|
"exit": "^0.1.2",
|
|
49
|
-
"fs-iterator": "^6.0.
|
|
49
|
+
"fs-iterator": "^6.0.2",
|
|
50
50
|
"get-tsconfig-compat": "^2.0.3",
|
|
51
|
-
"install-optional": "^0.1.
|
|
51
|
+
"install-optional": "^0.1.67",
|
|
52
52
|
"is-absolute": "^1.0.0",
|
|
53
53
|
"lodash.find": "^4.6.0",
|
|
54
54
|
"minimatch": "^3.1.2",
|
|
55
55
|
"mkdirp-classic": "^0.5.3",
|
|
56
|
-
"node-version-call": "^1.7.
|
|
56
|
+
"node-version-call": "^1.7.15",
|
|
57
57
|
"path-posix": "^1.0.0",
|
|
58
|
-
"queue-cb": "^1.5.
|
|
58
|
+
"queue-cb": "^1.5.4",
|
|
59
59
|
"resolve": "^1.22.10",
|
|
60
60
|
"rimraf2": "^2.8.2",
|
|
61
61
|
"ts-node": "*",
|