tshy 3.3.0 → 3.3.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"which-tsc.d.ts","sourceRoot":"","sources":["../../src/which-tsc.ts"],"names":[],"mappings":";AA2BA,wBAAkE","sourcesContent":["// find the location of the tsc binary\n// This is necessary because pnpm install trees don't expose binaries\n// of meta-deps, and it's nicer to not require that the tshy user has\n// a dep on typescript directly if they don't need it otherwise.\n// However, if they DO have a direct dep on typescript, then load the\n// tsc from their local node_modules/.bin/tsc location.\nimport { resolveImport } from 'resolve-import'\nimport { fileURLToPath } from 'url'\nimport config from './config.js'\n\nconst provider = {\n tsgo: '@typescript/native-preview',\n tsc: 'typescript',\n} as const\n\n// use theirs if possible, otherwise use tshy's\nconst resolve = async (pkg: (typeof provider)[keyof typeof provider]) =>\n await resolveImport(pkg + '/package.json', process.cwd() + '/x').catch(\n () => resolveImport(pkg + '/package.json', import.meta.url),\n )\n\nconst { compiler = 'tsc' } = config\nconst provPkg = provider[compiler]\n\nconst pjToCompiler = (pj: string) =>\n pj.slice(0, -1 * (provPkg + '/package.json').length) + `.bin/${compiler}`\n\nexport default pjToCompiler(fileURLToPath(await resolve(provPkg)))\n"]}
1
+ {"version":3,"file":"which-tsc.d.ts","sourceRoot":"","sources":["../../src/which-tsc.ts"],"names":[],"mappings":";AAgCA,wBAAkE","sourcesContent":["// find the location of the tsc binary\n// This is necessary because pnpm install trees don't expose binaries\n// of meta-deps, and it's nicer to not require that the tshy user has\n// a dep on typescript directly if they don't need it otherwise.\n// However, if they DO have a direct dep on typescript, then load the\n// tsc from their local node_modules/.bin/tsc location.\nimport { resolveImport } from 'resolve-import'\nimport { fileURLToPath } from 'url'\nimport config from './config.js'\n\nconst provider = {\n tsgo: '@typescript/native-preview',\n tsc: 'typescript',\n} as const\n\nconst pjToCompilerPath = {\n tsgo: 'bin/tsgo.js',\n tsc: 'bin/tsc',\n} as const\n\n// use theirs if possible, otherwise use tshy's\nconst resolve = async (pkg: (typeof provider)[keyof typeof provider]) =>\n await resolveImport(pkg + '/package.json', process.cwd() + '/x').catch(\n () => resolveImport(pkg + '/package.json', import.meta.url),\n )\n\nconst { compiler = 'tsc' } = config\nconst provPkg = provider[compiler]\n\nconst pjToCompiler = (pj: string) =>\n pj.slice(0, -1 * 'package.json'.length) + pjToCompilerPath[compiler]\n\nexport default pjToCompiler(fileURLToPath(await resolve(provPkg)))\n"]}
@@ -11,10 +11,14 @@ const provider = {
11
11
  tsgo: '@typescript/native-preview',
12
12
  tsc: 'typescript',
13
13
  };
14
+ const pjToCompilerPath = {
15
+ tsgo: 'bin/tsgo.js',
16
+ tsc: 'bin/tsc',
17
+ };
14
18
  // use theirs if possible, otherwise use tshy's
15
19
  const resolve = async (pkg) => await resolveImport(pkg + '/package.json', process.cwd() + '/x').catch(() => resolveImport(pkg + '/package.json', import.meta.url));
16
20
  const { compiler = 'tsc' } = config;
17
21
  const provPkg = provider[compiler];
18
- const pjToCompiler = (pj) => pj.slice(0, -1 * (provPkg + '/package.json').length) + `.bin/${compiler}`;
22
+ const pjToCompiler = (pj) => pj.slice(0, -1 * 'package.json'.length) + pjToCompilerPath[compiler];
19
23
  export default pjToCompiler(fileURLToPath(await resolve(provPkg)));
20
24
  //# sourceMappingURL=which-tsc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"which-tsc.js","sourceRoot":"","sources":["../../src/which-tsc.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qEAAqE;AACrE,qEAAqE;AACrE,gEAAgE;AAChE,qEAAqE;AACrE,uDAAuD;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,MAAM,QAAQ,GAAG;IACf,IAAI,EAAE,4BAA4B;IAClC,GAAG,EAAE,YAAY;CACT,CAAA;AAEV,+CAA+C;AAC/C,MAAM,OAAO,GAAG,KAAK,EAAE,GAA6C,EAAE,EAAE,CACtE,MAAM,aAAa,CAAC,GAAG,GAAG,eAAe,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK,CACpE,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,GAAG,eAAe,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAC5D,CAAA;AAEH,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,MAAM,CAAA;AACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAElC,MAAM,YAAY,GAAG,CAAC,EAAU,EAAE,EAAE,CAClC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,eAAe,CAAC,CAAC,MAAM,CAAC,GAAG,QAAQ,QAAQ,EAAE,CAAA;AAE3E,eAAe,YAAY,CAAC,aAAa,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA","sourcesContent":["// find the location of the tsc binary\n// This is necessary because pnpm install trees don't expose binaries\n// of meta-deps, and it's nicer to not require that the tshy user has\n// a dep on typescript directly if they don't need it otherwise.\n// However, if they DO have a direct dep on typescript, then load the\n// tsc from their local node_modules/.bin/tsc location.\nimport { resolveImport } from 'resolve-import'\nimport { fileURLToPath } from 'url'\nimport config from './config.js'\n\nconst provider = {\n tsgo: '@typescript/native-preview',\n tsc: 'typescript',\n} as const\n\n// use theirs if possible, otherwise use tshy's\nconst resolve = async (pkg: (typeof provider)[keyof typeof provider]) =>\n await resolveImport(pkg + '/package.json', process.cwd() + '/x').catch(\n () => resolveImport(pkg + '/package.json', import.meta.url),\n )\n\nconst { compiler = 'tsc' } = config\nconst provPkg = provider[compiler]\n\nconst pjToCompiler = (pj: string) =>\n pj.slice(0, -1 * (provPkg + '/package.json').length) + `.bin/${compiler}`\n\nexport default pjToCompiler(fileURLToPath(await resolve(provPkg)))\n"]}
1
+ {"version":3,"file":"which-tsc.js","sourceRoot":"","sources":["../../src/which-tsc.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qEAAqE;AACrE,qEAAqE;AACrE,gEAAgE;AAChE,qEAAqE;AACrE,uDAAuD;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,MAAM,QAAQ,GAAG;IACf,IAAI,EAAE,4BAA4B;IAClC,GAAG,EAAE,YAAY;CACT,CAAA;AAEV,MAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,SAAS;CACN,CAAA;AAEV,+CAA+C;AAC/C,MAAM,OAAO,GAAG,KAAK,EAAE,GAA6C,EAAE,EAAE,CACtE,MAAM,aAAa,CAAC,GAAG,GAAG,eAAe,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK,CACpE,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,GAAG,eAAe,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAC5D,CAAA;AAEH,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,MAAM,CAAA;AACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAElC,MAAM,YAAY,GAAG,CAAC,EAAU,EAAE,EAAE,CAClC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AAEtE,eAAe,YAAY,CAAC,aAAa,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA","sourcesContent":["// find the location of the tsc binary\n// This is necessary because pnpm install trees don't expose binaries\n// of meta-deps, and it's nicer to not require that the tshy user has\n// a dep on typescript directly if they don't need it otherwise.\n// However, if they DO have a direct dep on typescript, then load the\n// tsc from their local node_modules/.bin/tsc location.\nimport { resolveImport } from 'resolve-import'\nimport { fileURLToPath } from 'url'\nimport config from './config.js'\n\nconst provider = {\n tsgo: '@typescript/native-preview',\n tsc: 'typescript',\n} as const\n\nconst pjToCompilerPath = {\n tsgo: 'bin/tsgo.js',\n tsc: 'bin/tsc',\n} as const\n\n// use theirs if possible, otherwise use tshy's\nconst resolve = async (pkg: (typeof provider)[keyof typeof provider]) =>\n await resolveImport(pkg + '/package.json', process.cwd() + '/x').catch(\n () => resolveImport(pkg + '/package.json', import.meta.url),\n )\n\nconst { compiler = 'tsc' } = config\nconst provPkg = provider[compiler]\n\nconst pjToCompiler = (pj: string) =>\n pj.slice(0, -1 * 'package.json'.length) + pjToCompilerPath[compiler]\n\nexport default pjToCompiler(fileURLToPath(await resolve(provPkg)))\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tshy",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder",
5
5
  "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
6
6
  "license": "BlueOak-1.0.0",