Skip to content

Commit 1f32ea4

Browse files
committed
fix(strapi): Remove package.json import and hardcode strapiVersion
- Removed the dynamic import of `package.json` in `packages/strapi/src/generators/init/init.impl.ts`. - Hardcoded `strapiVersion` to `4.25.24` in the generator implementation. - Updated peer dependency version of `@strapi/strapi` in `packages/strapi/package.json` to `^4.25.24`.
1 parent 562124b commit 1f32ea4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/strapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"peerDependencies": {
2222
"@nx/devkit": "^21.0.0",
23-
"@strapi/strapi": "4.25.24"
23+
"@strapi/strapi": "^4.25.24"
2424
},
2525
"builders": "./executors.json",
2626
"generators": "./generators.json"

packages/strapi/src/generators/init/init.impl.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import * as path from 'path'
1616

1717
import type { StrapiGeneratorSchema } from './schema'
1818

19-
import packageJson from '../../../package.json'
20-
2119
// Base off https://github.com/strapi/strapi/blob/main/packages/generators/app/src/index.ts#L19
2220
function generateStrapi(options: NormalizedSchema) {
2321
return generateNew({
@@ -26,7 +24,7 @@ function generateStrapi(options: NormalizedSchema) {
2624
// disable quickstart run app after creation
2725
runQuickstartApp: false,
2826
// use package.json version as strapiVersion (all packages have the same version);
29-
strapiVersion: packageJson.peerDependencies['@strapi/strapi'],
27+
strapiVersion: '4.25.24',
3028
debug: false,
3129
quick: true,
3230
packageJsonStrapi: {

0 commit comments

Comments
 (0)