ts-swc-transform 2.7.1 → 2.7.2

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.
@@ -20,7 +20,7 @@ _export(exports, {
20
20
  }
21
21
  });
22
22
  var moduleRegEx = /^[^./]|^\.[^./]|^\.\.[^/]/;
23
- var typeFileRegEx = /^[^.]+\.d\.[cm]?ts$/;
23
+ var typeFileRegEx = /\.d\.[cm]?ts$/;
24
24
  var extensions = [
25
25
  '.js',
26
26
  '.jsx',
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/constants.ts"],"sourcesContent":["export const moduleRegEx = /^[^./]|^\\.[^./]|^\\.\\.[^/]/;\nexport const typeFileRegEx = /^[^.]+\\.d\\.[cm]?ts$/;\nexport const extensions = ['.js', '.jsx', '.cjs', '.mjs', '.ts', '.tsx', '.cts', '.mts', '.es6', '.es'];\n"],"names":["extensions","moduleRegEx","typeFileRegEx"],"mappings":";;;;;;;;;;;QAEaA;eAAAA;;QAFAC;eAAAA;;QACAC;eAAAA;;;AADN,IAAMD,cAAc;AACpB,IAAMC,gBAAgB;AACtB,IAAMF,aAAa;IAAC;IAAO;IAAQ;IAAQ;IAAQ;IAAO;IAAQ;IAAQ;IAAQ;IAAQ;CAAM"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/constants.ts"],"sourcesContent":["export const moduleRegEx = /^[^./]|^\\.[^./]|^\\.\\.[^/]/;\nexport const typeFileRegEx = /\\.d\\.[cm]?ts$/;\nexport const extensions = ['.js', '.jsx', '.cjs', '.mjs', '.ts', '.tsx', '.cts', '.mts', '.es6', '.es'];\n"],"names":["extensions","moduleRegEx","typeFileRegEx"],"mappings":";;;;;;;;;;;QAEaA;eAAAA;;QAFAC;eAAAA;;QACAC;eAAAA;;;AADN,IAAMD,cAAc;AACpB,IAAMC,gBAAgB;AACtB,IAAMF,aAAa;IAAC;IAAO;IAAQ;IAAQ;IAAQ;IAAO;IAAQ;IAAQ;IAAQ;IAAQ;CAAM"}
@@ -16,10 +16,12 @@ function _interop_require_default(obj) {
16
16
  };
17
17
  }
18
18
  function createMatcher(tsconfig) {
19
+ var include = tsconfig.config.include || [];
20
+ var exclude = tsconfig.config.exclude || [];
19
21
  return (0, _testmatch.default)({
20
22
  cwd: _path.default.dirname(tsconfig.path),
21
- include: tsconfig.config.include,
22
- exclude: tsconfig.config.exclude
23
+ include: include,
24
+ exclude: exclude
23
25
  });
24
26
  }
25
27
  /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import path from 'path';\nimport match from 'test-match';\nimport type { Matcher, TSConfig } from './types.ts';\n\nexport default function createMatcher(tsconfig: TSConfig): Matcher {\n return match({ cwd: path.dirname(tsconfig.path), include: tsconfig.config.include as string[], exclude: tsconfig.config.exclude as string[] });\n}\n"],"names":["createMatcher","tsconfig","match","cwd","path","dirname","include","config","exclude"],"mappings":";;;;+BAIA;;;eAAwBA;;;2DAJP;gEACC;;;;;;AAGH,SAASA,cAAcC,QAAkB;IACtD,OAAOC,IAAAA,kBAAK,EAAC;QAAEC,KAAKC,aAAI,CAACC,OAAO,CAACJ,SAASG,IAAI;QAAGE,SAASL,SAASM,MAAM,CAACD,OAAO;QAAcE,SAASP,SAASM,MAAM,CAACC,OAAO;IAAa;AAC9I"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import path from 'path';\nimport match from 'test-match';\nimport type { Matcher, TSConfig } from './types.ts';\n\nexport default function createMatcher(tsconfig: TSConfig): Matcher {\n const include = (tsconfig.config.include || []) as string[];\n const exclude = (tsconfig.config.exclude || []) as string[];\n return match({ cwd: path.dirname(tsconfig.path), include, exclude });\n}\n"],"names":["createMatcher","tsconfig","include","config","exclude","match","cwd","path","dirname"],"mappings":";;;;+BAIA;;;eAAwBA;;;2DAJP;gEACC;;;;;;AAGH,SAASA,cAAcC,QAAkB;IACtD,IAAMC,UAAWD,SAASE,MAAM,CAACD,OAAO,IAAI,EAAE;IAC9C,IAAME,UAAWH,SAASE,MAAM,CAACC,OAAO,IAAI,EAAE;IAC9C,OAAOC,IAAAA,kBAAK,EAAC;QAAEC,KAAKC,aAAI,CAACC,OAAO,CAACP,SAASM,IAAI;QAAGL,SAAAA;QAASE,SAAAA;IAAQ;AACpE"}
@@ -1,5 +1,5 @@
1
1
  export const moduleRegEx = /^[^./]|^\.[^./]|^\.\.[^/]/;
2
- export const typeFileRegEx = /^[^.]+\.d\.[cm]?ts$/;
2
+ export const typeFileRegEx = /\.d\.[cm]?ts$/;
3
3
  export const extensions = [
4
4
  '.js',
5
5
  '.jsx',
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/constants.ts"],"sourcesContent":["export const moduleRegEx = /^[^./]|^\\.[^./]|^\\.\\.[^/]/;\nexport const typeFileRegEx = /^[^.]+\\.d\\.[cm]?ts$/;\nexport const extensions = ['.js', '.jsx', '.cjs', '.mjs', '.ts', '.tsx', '.cts', '.mts', '.es6', '.es'];\n"],"names":["moduleRegEx","typeFileRegEx","extensions"],"mappings":"AAAA,OAAO,MAAMA,cAAc,4BAA4B;AACvD,OAAO,MAAMC,gBAAgB,sBAAsB;AACnD,OAAO,MAAMC,aAAa;IAAC;IAAO;IAAQ;IAAQ;IAAQ;IAAO;IAAQ;IAAQ;IAAQ;IAAQ;CAAM,CAAC"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/constants.ts"],"sourcesContent":["export const moduleRegEx = /^[^./]|^\\.[^./]|^\\.\\.[^/]/;\nexport const typeFileRegEx = /\\.d\\.[cm]?ts$/;\nexport const extensions = ['.js', '.jsx', '.cjs', '.mjs', '.ts', '.tsx', '.cts', '.mts', '.es6', '.es'];\n"],"names":["moduleRegEx","typeFileRegEx","extensions"],"mappings":"AAAA,OAAO,MAAMA,cAAc,4BAA4B;AACvD,OAAO,MAAMC,gBAAgB,gBAAgB;AAC7C,OAAO,MAAMC,aAAa;IAAC;IAAO;IAAQ;IAAQ;IAAQ;IAAO;IAAQ;IAAQ;IAAQ;IAAQ;CAAM,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import path from 'path';
2
2
  import match from 'test-match';
3
3
  export default function createMatcher(tsconfig) {
4
+ const include = tsconfig.config.include || [];
5
+ const exclude = tsconfig.config.exclude || [];
4
6
  return match({
5
7
  cwd: path.dirname(tsconfig.path),
6
- include: tsconfig.config.include,
7
- exclude: tsconfig.config.exclude
8
+ include,
9
+ exclude
8
10
  });
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import path from 'path';\nimport match from 'test-match';\nimport type { Matcher, TSConfig } from './types.ts';\n\nexport default function createMatcher(tsconfig: TSConfig): Matcher {\n return match({ cwd: path.dirname(tsconfig.path), include: tsconfig.config.include as string[], exclude: tsconfig.config.exclude as string[] });\n}\n"],"names":["path","match","createMatcher","tsconfig","cwd","dirname","include","config","exclude"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,WAAW,aAAa;AAG/B,eAAe,SAASC,cAAcC,QAAkB;IACtD,OAAOF,MAAM;QAAEG,KAAKJ,KAAKK,OAAO,CAACF,SAASH,IAAI;QAAGM,SAASH,SAASI,MAAM,CAACD,OAAO;QAAcE,SAASL,SAASI,MAAM,CAACC,OAAO;IAAa;AAC9I"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/typescript/ts-swc-transform/src/createMatcher.ts"],"sourcesContent":["import path from 'path';\nimport match from 'test-match';\nimport type { Matcher, TSConfig } from './types.ts';\n\nexport default function createMatcher(tsconfig: TSConfig): Matcher {\n const include = (tsconfig.config.include || []) as string[];\n const exclude = (tsconfig.config.exclude || []) as string[];\n return match({ cwd: path.dirname(tsconfig.path), include, exclude });\n}\n"],"names":["path","match","createMatcher","tsconfig","include","config","exclude","cwd","dirname"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,WAAW,aAAa;AAG/B,eAAe,SAASC,cAAcC,QAAkB;IACtD,MAAMC,UAAWD,SAASE,MAAM,CAACD,OAAO,IAAI,EAAE;IAC9C,MAAME,UAAWH,SAASE,MAAM,CAACC,OAAO,IAAI,EAAE;IAC9C,OAAOL,MAAM;QAAEM,KAAKP,KAAKQ,OAAO,CAACL,SAASH,IAAI;QAAGI;QAASE;IAAQ;AACpE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-swc-transform",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Typescript transformers for swc. Supports Node >= 0.8",
5
5
  "keywords": [
6
6
  "matcher",