@oclif/core 3.0.0-beta.16 → 3.0.0-beta.17

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.
@@ -24,7 +24,11 @@ function loadTSConfig(root) {
24
24
  try {
25
25
  typescript = require((0, node_path_1.join)(root, 'node_modules', 'typescript'));
26
26
  }
27
- catch { }
27
+ catch {
28
+ debug(`Could not find typescript dependency. Skipping ts-node registration for ${root}.`);
29
+ (0, errors_1.memoizedWarn)('Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.');
30
+ return;
31
+ }
28
32
  }
29
33
  if ((0, node_fs_1.existsSync)(tsconfigPath) && typescript) {
30
34
  const tsconfig = typescript.parseConfigFileTextToJson(tsconfigPath, (0, util_1.readJsonSync)(tsconfigPath, false)).config;
@@ -45,7 +49,15 @@ function registerTSNode(root) {
45
49
  debug('registering ts-node at', root);
46
50
  const tsNodePath = require.resolve('ts-node', { paths: [root, __dirname] });
47
51
  debug('ts-node path:', tsNodePath);
48
- const tsNode = require(tsNodePath);
52
+ let tsNode;
53
+ try {
54
+ tsNode = require(tsNodePath);
55
+ }
56
+ catch {
57
+ debug(`Could not find ts-node at ${tsNodePath}. Skipping ts-node registration for ${root}.`);
58
+ (0, errors_1.memoizedWarn)(`Could not find ts-node at ${tsNodePath}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);
59
+ return;
60
+ }
49
61
  const typeRoots = [
50
62
  (0, node_path_1.join)(root, 'node_modules', '@types'),
51
63
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "3.0.0-beta.16",
4
+ "version": "3.0.0-beta.17",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -28,8 +28,6 @@
28
28
  "strip-ansi": "^6.0.1",
29
29
  "supports-color": "^8.1.1",
30
30
  "supports-hyperlinks": "^2.2.0",
31
- "ts-node": "^10.9.1",
32
- "tslib": "^2.5.0",
33
31
  "widest-line": "^3.1.0",
34
32
  "wordwrap": "^1.0.0",
35
33
  "wrap-ansi": "^7.0.0"
@@ -72,6 +70,8 @@
72
70
  "shx": "^0.3.4",
73
71
  "sinon": "^11.1.2",
74
72
  "tsd": "^0.29.0",
73
+ "ts-node": "^10.9.1",
74
+ "tslib": "^2.5.0",
75
75
  "typescript": "^5"
76
76
  },
77
77
  "engines": {