diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..7b4bce4d87 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v10.15.1 \ No newline at end of file diff --git a/apps/angular-console-e2e/src/integration/extensions.spec.ts b/apps/angular-console-e2e/src/integration/extensions.spec.ts index 9a8da57a55..078558b760 100644 --- a/apps/angular-console-e2e/src/integration/extensions.spec.ts +++ b/apps/angular-console-e2e/src/integration/extensions.spec.ts @@ -51,9 +51,9 @@ describe('Extensions', () => { }); // check that the schematics added by angular material are available - cy.wait(300); // Needed to de-flake this test + cy.wait(1000); // Needed to de-flake this test goToGenerate(); - cy.wait(300); // Needed to de-flake this test + cy.wait(1000); // Needed to de-flake this test taskListHeaders($p => { expect(texts($p)[1]).to.equal('@angular/material'); }); diff --git a/libs/feature-workspaces/src/lib/projects/projects.component.html b/libs/feature-workspaces/src/lib/projects/projects.component.html index 4152334fc0..f546da284d 100644 --- a/libs/feature-workspaces/src/lib/projects/projects.component.html +++ b/libs/feature-workspaces/src/lib/projects/projects.component.html @@ -29,11 +29,7 @@
{ const commandRunning = pseudoTerminalFactory({ diff --git a/libs/server/src/lib/utils/file-utils.ts b/libs/server/src/lib/utils/file-utils.ts index 497b98a0db..c257750983 100644 --- a/libs/server/src/lib/utils/file-utils.ts +++ b/libs/server/src/lib/utils/file-utils.ts @@ -135,6 +135,44 @@ export class FileUtils { } } + findClosestNvm(d: string): string { + if (this.hasExecutable('nvm', d)) { + return 'nvm'; + } + const dir = this.convertToWslPath(d); + if (this.directoryExists(this.joinForCommandRun(dir, 'node_modules'))) { + if (platform() === 'win32' && !this.isWsl()) { + if (this.fileExistsSync(this.joinForCommandRun(dir, 'nvm.cmd'))) { + return this.joinForCommandRun(dir, 'nvm.cmd'); + } else { + return this.joinForCommandRun(dir, 'node_modules', '.bin', 'nvm.cmd'); + } + } else { + if ( + this.fileExistsSync( + this.joinForCommandRun(dir, 'node_modules', '.bin', 'nvm') + ) + ) { + return this.joinForCommandRun(dir, 'node_modules', '.bin', 'nvm'); + } else { + return this.joinForCommandRun( + dir, + 'node_modules', + 'nvm', + 'bin', + 'nvm' + ); + } + } + } else { + const parent = path.dirname(dir); + if (parent === dir) { + throw new Error(`Cannot find 'nvm'`); + } + return this.findClosestNvm(parent); + } + } + joinForCommandRun(...p: string[]) { return p .splice(1) diff --git a/package.json b/package.json index 59d53cb233..66979ff282 100644 --- a/package.json +++ b/package.json @@ -109,15 +109,15 @@ "@nrwl/schematics": "7.5.2", "@schematics/angular": "7.3.1", "@types/d3-hierarchy": "^1.1.6", - "@types/d3-shape": "^1.3.1", "@types/d3-selection": "^1.4.1", + "@types/d3-shape": "^1.3.1", "@types/d3-transition": "^1.1.4", "@types/electron-store": "^1.3.0", "@types/fontfaceobserver": "^0.0.6", "@types/get-port": "^4.0.1", "@types/graphql": "14.0.5", "@types/jest": "^24.0.0", - "@types/node": "10.12.21", + "@types/node": "^10.12.21", "@types/opn": "^5.1.0", "@types/request": "^2.48.1", "@types/semver": "^5.5.0", @@ -136,11 +136,11 @@ "apollo-server-express": "^2.4.0", "codelyzer": "4.5.0", "cypress": "^3.1.5", - "dotenv": "6.2.0", "d3-hierarchy": "^1.1.8", - "d3-shape": "^1.3.4", "d3-selection": "^1.4.0", + "d3-shape": "^1.3.4", "d3-transition": "^1.2.0", + "dotenv": "6.2.0", "electron": "2.0.14", "electron-builder": "20.28.4", "electron-installer-dmg": "2.0.0", diff --git a/yarn.lock b/yarn.lock index f6787a213e..00cd1415bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -850,11 +850,16 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.44.tgz#1d4a798e53f35212fd5ad4d04050620171cd5b5e" integrity sha512-k2tWTQU8G4+iSMvqKi0Q9IIsWAp/n8xzdZS4Q4YVIltApoMA00wFBFdlJnmoaK1/z7B0Cy0yPe6GgXteSmdUNw== -"@types/node@*", "@types/node@10.12.21", "@types/node@^10.1.0": +"@types/node@*", "@types/node@^10.1.0": version "10.12.21" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e" integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ== +"@types/node@^10.12.21": + version "10.14.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.1.tgz#8701cd760acc20beba5ffe0b7a1b879f39cb8c41" + integrity sha512-Rymt08vh1GaW4vYB6QP61/5m/CFLGnFZP++bJpWbiNxceNa6RBipDmb413jvtSf/R1gg5a/jQVl2jY4XVRscEA== + "@types/node@^8.0.24": version "8.10.39" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.39.tgz#e7e87ad00364dd7bc485c940926345b8ec1a26ca"