create-adonisjs 2.0.0 → 2.1.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.
@@ -127,6 +127,16 @@ export class CreateNewApp extends BaseCommand {
127
127
  async #removeReadmeFile() {
128
128
  await unlink(join(this.destination, 'README.md'));
129
129
  }
130
+ /**
131
+ * Optionally remove existing lock file. Errors are ignored
132
+ */
133
+ async #removeLockFile() {
134
+ await Promise.allSettled([
135
+ unlink(join(this.destination, 'package-lock.json')),
136
+ unlink(join(this.destination, 'yarn.lock')),
137
+ unlink(join(this.destination, 'pnpm-lock.yaml')),
138
+ ]);
139
+ }
130
140
  /**
131
141
  * If starter template has an `.env.example` file, then copy it to `.env`
132
142
  */
@@ -232,6 +242,7 @@ export class CreateNewApp extends BaseCommand {
232
242
  .add('Download starter kit', async (task) => {
233
243
  task.update(`Downloading "${this.kit}"`);
234
244
  await downloadTemplate(this.kit, { dir: this.destination, auth: this.token });
245
+ await this.#removeLockFile();
235
246
  return `Downloaded "${this.kit}"`;
236
247
  })
237
248
  .addIf(this.gitInit === true, 'Initialize git repository', async () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-adonisjs",
3
3
  "description": "Scaffold new AdonisJS applications using starter kits",
4
- "version": "2.0.0",
4
+ "version": "2.1.0",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
7
7
  "files": [