@knighted/duel 1.0.0-alpha.0 → 1.0.0-alpha.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.
package/dist/duel.cjs CHANGED
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.duel = void 0;
8
8
  var _nodeProcess = require("node:process");
9
- var _nodeUrl = require("node:url");
10
9
  var _nodePath = require("node:path");
11
10
  var _nodeChild_process = require("node:child_process");
12
11
  var _promises = require("node:fs/promises");
@@ -16,10 +15,8 @@ var _glob = require("glob");
16
15
  var _specifier = require("@knighted/specifier");
17
16
  var _init = require("./init.cjs");
18
17
  var _util = require("./util.cjs");
19
- const _filename = (0, _nodeUrl.fileURLToPath)(import.meta.url);
20
- const _dirname = (0, _nodePath.dirname)(_filename);
21
- const root = (0, _nodePath.join)(_dirname, '..');
22
- const tsc = (0, _nodePath.join)(root, 'node_modules', '.bin', 'tsc');
18
+ // TypeScript is defined as a peer dependency.
19
+ const tsc = (0, _nodePath.join)((0, _nodeProcess.cwd)(), 'node_modules', '.bin', 'tsc');
23
20
  const runBuild = project => {
24
21
  const {
25
22
  status,
package/dist/duel.js CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { argv } from 'node:process';
3
- import { fileURLToPath } from 'node:url';
4
- import { dirname, join } from 'node:path';
2
+ import { argv, cwd } from 'node:process';
3
+ import { join } from 'node:path';
5
4
  import { spawnSync } from 'node:child_process';
6
5
  import { writeFile, rm } from 'node:fs/promises';
7
6
  import { randomBytes } from 'node:crypto';
@@ -10,10 +9,9 @@ import { glob } from 'glob';
10
9
  import { specifier } from '@knighted/specifier';
11
10
  import { init } from './init.js';
12
11
  import { getRealPathAsFileUrl, logError, log } from './util.js';
13
- const __filename = fileURLToPath(import.meta.url);
14
- const __dirname = dirname(__filename);
15
- const root = join(__dirname, '..');
16
- const tsc = join(root, 'node_modules', '.bin', 'tsc');
12
+
13
+ // TypeScript is defined as a peer dependency.
14
+ const tsc = join(cwd(), 'node_modules', '.bin', 'tsc');
17
15
  const runBuild = project => {
18
16
  const {
19
17
  status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knighted/duel",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.1",
4
4
  "description": "TypeScript dual packages.",
5
5
  "type": "module",
6
6
  "main": "dist",