From 6111f0e4949b8998a869358cc21f79fb2d7124cc Mon Sep 17 00:00:00 2001 From: Alex Van Camp Date: Tue, 20 Jun 2023 14:53:38 -0500 Subject: [PATCH] fix: use more specific version ranges for generated typescript bundle dev dependencies --- src/generators/app/index.ts | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/generators/app/index.ts b/src/generators/app/index.ts index 8590ae4..8bdea7c 100644 --- a/src/generators/app/index.ts +++ b/src/generators/app/index.ts @@ -291,25 +291,23 @@ export default class AppGenerator extends Generator { this.fs.copy(this.templatePath('.eslintignore'), this.destinationPath('.eslintignore')); } + /* eslint-disable @typescript-eslint/naming-convention */ await this.addDependencies(['ts-node']); - await this.addDevDependencies([ - 'typescript', - '@types/node', - '@parcel/core', - '@parcel/config-default', - '@parcel/reporter-cli', - '@parcel/validator-typescript', - 'glob', - 'trash-cli', - 'nodemon', - 'concurrently', - ]); await this.addDevDependencies({ - /* eslint-disable @typescript-eslint/naming-convention */ + typescript: '^5.1.3', + '@types/node': '^18', '@nodecg/types': this.props.compatibleRange ?? '*', - /* eslint-enable @typescript-eslint/naming-convention */ + '@parcel/core': '*', + '@parcel/config-default': '*', + '@parcel/reporter-cli': '*', + '@parcel/validator-typescript': '*', + glob: '^10.2.7', + 'trash-cli': '*', + nodemon: '*', + concurrently: '*', }); - + /* eslint-enable @typescript-eslint/naming-convention */ + if (this.props.react) { await this.addDependencies(['react', 'react-dom']); await this.addDependencies(['@types/react', '@types/react-dom']);