@travetto/scaffold 7.1.3 → 7.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/scaffold",
3
- "version": "7.1.3",
3
+ "version": "7.1.4",
4
4
  "type": "module",
5
5
  "description": "App Scaffold for the Travetto framework",
6
6
  "keywords": [
@@ -28,14 +28,14 @@
28
28
  "trv-scaffold": "bin/trv-scaffold.js"
29
29
  },
30
30
  "dependencies": {
31
- "@travetto/cli": "^7.1.3",
32
- "@travetto/compiler": "^7.1.2",
33
- "@travetto/runtime": "^7.1.3",
31
+ "@travetto/cli": "^7.1.4",
32
+ "@travetto/compiler": "^7.1.3",
33
+ "@travetto/runtime": "^7.1.4",
34
34
  "enquirer": "^2.4.1",
35
35
  "mustache": "^4.2.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@travetto/model": "^7.1.3",
38
+ "@travetto/model": "^7.1.4",
39
39
  "@types/mustache": "^4.2.6"
40
40
  },
41
41
  "travetto": {
@@ -196,14 +196,14 @@ export class Context {
196
196
  switch (this.packageManager) {
197
197
  case 'npm': await this.#exec('npm', ['i']); break;
198
198
  case 'yarn': await this.#exec('yarn', []); break;
199
- default: throw new Error(`Unknown package manager: ${this.packageManager} `);
199
+ case 'pnpm': await this.#exec('pnpm', ['install']); break;
200
200
  }
201
201
 
202
202
  yield cliTpl`${{ type: 'Ensuring latest dependencies' }} `;
203
203
  switch (this.packageManager) {
204
204
  case 'npm': await this.#exec('npm', ['update', '-S']); break;
205
205
  case 'yarn': await this.#exec('yarn', ['upgrade']); break;
206
- default: throw new Error(`Unknown package manager: ${this.packageManager} `);
206
+ case 'pnpm': await this.#exec('pnpm', ['update', '--latest']); break;
207
207
  }
208
208
 
209
209
  yield cliTpl`${{ type: 'Initial Build' }} `;
@@ -1,3 +1,5 @@
1
+ import { PACKAGE_MANAGERS } from '@travetto/manifest';
2
+
1
3
  export type Feature = {
2
4
  title?: string;
3
5
  package?: string | string[];
@@ -15,10 +17,7 @@ export type Feature = {
15
17
  export const FEATURES: Feature[] = [
16
18
  {
17
19
  title: 'Package Manager',
18
- choices: [
19
- { title: 'NPM', field: 'packageManager', value: 'npm' },
20
- { title: 'Yarn', field: 'packageManager', value: 'yarn' }
21
- ],
20
+ choices: PACKAGE_MANAGERS.map(manager => ({ title: manager.title, field: 'packageManager', value: manager.type })),
22
21
  required: true,
23
22
  default: 'npm'
24
23
  },