oclif 3.9.0 → 3.9.2-dev.0

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,5 +1,5 @@
1
1
  {
2
- "version": "3.9.0",
2
+ "version": "3.9.2-dev.0",
3
3
  "commands": {
4
4
  "generate": {
5
5
  "id": "generate",
@@ -41,7 +41,7 @@ class Manifest extends core_1.Command {
41
41
  const versions = JSON.parse(this.executeCommand(`npm view ${jitPlugin}@latest versions --json`).stdout);
42
42
  const maxSatisfying = semver.maxSatisfying(versions, version);
43
43
  this.cloneRepo(repoUrl, fullPath, maxSatisfying);
44
- this.executeCommand('yarn', { cwd: fullPath });
44
+ this.executeCommand('yarn --ignore-scripts', { cwd: fullPath });
45
45
  this.executeCommand('yarn tsc', { cwd: fullPath });
46
46
  const plugin = new core_1.Plugin({ root: fullPath, type: 'jit', ignoreManifest: true, errorOnManifestCreate: true });
47
47
  await plugin.load();
@@ -52,7 +52,24 @@ async function build(c, options = {}) {
52
52
  const yarnRoot = findYarnWorkspaceRoot(c.root) || c.root;
53
53
  if (fs.existsSync(path.join(yarnRoot, 'yarn.lock'))) {
54
54
  await fs.copy(path.join(yarnRoot, 'yarn.lock'), path.join(c.workspace(), 'yarn.lock'));
55
- await exec('yarn --no-progress --production --non-interactive', { cwd: c.workspace() });
55
+ const yarnVersion = (await exec('yarn -v')).stdout.charAt(0);
56
+ if (yarnVersion === '1') {
57
+ await exec('yarn --no-progress --production --non-interactive', { cwd: c.workspace() });
58
+ }
59
+ else if (yarnVersion === '2') {
60
+ throw new Error('Yarn 2 is not supported yet. Try using Yarn 1, or Yarn 3');
61
+ }
62
+ else {
63
+ try {
64
+ await exec('yarn workspaces focus --production', { cwd: c.workspace() });
65
+ }
66
+ catch (error) {
67
+ if (error instanceof Error && error.message.includes('Command not found')) {
68
+ throw new Error('Missing workspace tools. Run `yarn plugin import workspace-tools`.');
69
+ }
70
+ throw error;
71
+ }
72
+ }
56
73
  }
57
74
  else {
58
75
  const lockpath = fs.existsSync(path.join(c.root, 'package-lock.json')) ?
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "3.9.0",
4
+ "version": "3.9.2-dev.0",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run",
@@ -9,10 +9,10 @@
9
9
  },
10
10
  "bugs": "https://github.com/oclif/oclif/issues",
11
11
  "dependencies": {
12
- "@oclif/core": "^2.8.4",
13
- "@oclif/plugin-help": "^5.1.19",
14
- "@oclif/plugin-not-found": "^2.3.7",
15
- "@oclif/plugin-warn-if-update-available": "^2.0.14",
12
+ "@oclif/core": "^2.9.4",
13
+ "@oclif/plugin-help": "^5.2.14",
14
+ "@oclif/plugin-not-found": "^2.3.32",
15
+ "@oclif/plugin-warn-if-update-available": "^2.0.44",
16
16
  "aws-sdk": "^2.1231.0",
17
17
  "concurrently": "^7.6.0",
18
18
  "debug": "^4.3.3",
@@ -30,8 +30,8 @@
30
30
  "yosay": "^2.0.2"
31
31
  },
32
32
  "devDependencies": {
33
- "@oclif/plugin-legacy": "^1.2.7",
34
- "@oclif/test": "^2.3.0",
33
+ "@oclif/plugin-legacy": "^1.3.0",
34
+ "@oclif/test": "^2.3.31",
35
35
  "@types/chai": "^4.3.4",
36
36
  "@types/cli-progress": "^3.11.0",
37
37
  "@types/fs-extra": "^9.0",
@@ -140,4 +140,4 @@
140
140
  "registry": "https://registry.npmjs.org"
141
141
  },
142
142
  "types": "lib/index.d.ts"
143
- }
143
+ }