@studio-fes/create-fes-app 0.3.11 → 0.4.1

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,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from 'node:child_process'
3
- import { existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'
3
+ import { existsSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
4
4
  import { cp, mkdir, readdir, rename } from 'node:fs/promises'
5
5
  import { dirname, join, resolve } from 'node:path'
6
6
  import { fileURLToPath } from 'node:url'
@@ -151,19 +151,16 @@ async function main() {
151
151
  }
152
152
  }
153
153
 
154
- // pnpm >=10 blocks postinstall scripts for these deps until approved via
155
- // `pnpm approve-builds`. Pre-approve them here so a fresh scaffold installs
156
- // cleanly without an extra manual/interactive step.
157
- if (answers.packageManager === 'pnpm') {
158
- pkgJson.pnpm = {
159
- ...pkgJson.pnpm,
160
- onlyBuiltDependencies: ['@parcel/watcher', 'esbuild', 'sharp', 'unrs-resolver'],
161
- }
162
- }
163
-
164
154
  writeFileSync(pkgJsonPath, `${JSON.stringify(pkgJson, null, 2)}\n`)
165
155
  }
166
156
 
157
+ // The template ships a pnpm-workspace.yaml pre-approving native build scripts
158
+ // (esbuild, sharp, etc.) so `pnpm install` doesn't require `pnpm approve-builds`.
159
+ // Other package managers ignore this file, so only keep it for pnpm.
160
+ const pnpmWorkspacePath = join(targetDir, 'pnpm-workspace.yaml')
161
+ if (answers.packageManager !== 'pnpm' && existsSync(pnpmWorkspacePath))
162
+ rmSync(pnpmWorkspacePath)
163
+
167
164
  if (answers.gitInit) {
168
165
  console.log(pc.dim('\nInitializing git repository...'))
169
166
  spawnSync('git', ['init'], { cwd: targetDir, stdio: 'inherit' })
@@ -10,8 +10,8 @@
10
10
  "postinstall": "nuxt prepare"
11
11
  },
12
12
  "dependencies": {
13
- "@studio-fes/layer-base": "^0.3.11",
14
- "@studio-fes/layer-craft": "^0.3.11",
13
+ "@studio-fes/layer-base": "^0.4.1",
14
+ "@studio-fes/layer-craft": "^0.4.1",
15
15
  "nuxt": "^4.5.1",
16
16
  "vue": "^3.5.40",
17
17
  "vue-router": "^5.2.0"
@@ -0,0 +1,14 @@
1
+ shamefullyHoist: true
2
+ shellEmulator: true
3
+
4
+ trustPolicy: warn
5
+ minimumReleaseAge: 0
6
+
7
+ autoInstallPeers: true
8
+ strictPeerDependencies: false
9
+ saveExact: true
10
+ allowBuilds:
11
+ '@parcel/watcher': true
12
+ esbuild: true
13
+ sharp: true
14
+ unrs-resolver: true
@@ -10,8 +10,8 @@
10
10
  "postinstall": "nuxt prepare"
11
11
  },
12
12
  "dependencies": {
13
- "@studio-fes/layer-base": "^0.3.11",
14
- "@studio-fes/layer-strapi": "^0.3.11",
13
+ "@studio-fes/layer-base": "^0.4.1",
14
+ "@studio-fes/layer-strapi": "^0.4.1",
15
15
  "nuxt": "^4.5.1",
16
16
  "vue": "^3.5.40",
17
17
  "vue-router": "^5.2.0"
@@ -0,0 +1,14 @@
1
+ shamefullyHoist: true
2
+ shellEmulator: true
3
+
4
+ trustPolicy: warn
5
+ minimumReleaseAge: 0
6
+
7
+ autoInstallPeers: true
8
+ strictPeerDependencies: false
9
+ saveExact: true
10
+ allowBuilds:
11
+ '@parcel/watcher': true
12
+ esbuild: true
13
+ sharp: true
14
+ unrs-resolver: true
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@studio-fes/create-fes-app",
3
3
  "type": "module",
4
- "version": "0.3.11",
4
+ "version": "0.4.1",
5
5
  "description": "Interactive wizard to scaffold a new project from the studio fes Nuxt layers starters (Craft CMS, Strapi).",
6
6
  "bin": {
7
7
  "create-fes-app": "./bin/create-fes-app.mjs"