Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

Comment on lines -1 to -3
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Husky deprecated this syntax in 9, will be removed in 10

npx --no-install -- commitlint --edit ${1}
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

Comment on lines -1 to -3
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Husky deprecated this syntax in 9, will be removed in 10

npx --no-install lint-staged
16 changes: 8 additions & 8 deletions src/cli/commands/utils/init/file-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ export const generateFiles = async (
'@strapi/design-system': '^2.0.0',
'@strapi/icons': '^2.0.0',
'react-intl': '^6.0.0',
react: '^17.0.0 || ^18.0.0',
'react-dom': '^17.0.0 || ^18.0.0',
react: '^18.0.0',
'react-dom': '^18.0.0',
Comment on lines -120 to +121
Copy link
Copy Markdown
Author

@unrevised6419 unrevised6419 Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: In the end it will still resolve to the biggest from them. Also creating a new plugin with v17 kind of does not make sense.

'react-router-dom': '^6.0.0',
'styled-components': '^6.0.0',
};

pkgJson.peerDependencies = {
...pkgJson.peerDependencies,
react: '^17.0.0 || ^18.0.0',
'react-dom': '^17.0.0 || ^18.0.0',
react: '^18.0.0',
'react-dom': '^18.0.0',
'react-router-dom': '^6.0.0',
'styled-components': '^6.0.0',
};
Expand Down Expand Up @@ -158,13 +158,13 @@ export const generateFiles = async (

pkgJson.scripts = {
...pkgJson.scripts,
'test:ts:front': 'run -T tsc -p admin/tsconfig.json',
'test:ts:front': 'tsc -p admin/tsconfig.json',
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: There is no such binary run

};

pkgJson.devDependencies = {
...pkgJson.devDependencies,
'@types/react': '*',
'@types/react-dom': '*',
'@types/react': '^18.0.0',
'@types/react-dom': '^18.0.0',
Comment on lines -166 to +167
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Without this the version resolves to v19

};

const { adminTsconfigFiles } = await import('../../plugin/init/files/typescript');
Expand All @@ -181,7 +181,7 @@ export const generateFiles = async (

pkgJson.scripts = {
...pkgJson.scripts,
'test:ts:back': 'run -T tsc -p server/tsconfig.json',
'test:ts:back': 'tsc -p server/tsconfig.json',
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: There is no such binary run

};

const { serverTsconfigFiles } = await import('../../plugin/init/files/typescript');
Expand Down
6 changes: 1 addition & 5 deletions src/cli/commands/utils/init/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import getLatestVersion from 'get-latest-version';
* Shared types and utilities for plugin initialization.
*/

// TODO: remove these when release versions are available
export const USE_RC_VERSIONS: string[] = ['@strapi/design-system', '@strapi/icons'];
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: As of this writing the versions are 2.2.0


export interface PackageExport {
types?: string;
require: string;
Expand Down Expand Up @@ -57,9 +54,8 @@ export const resolveLatestVersionOfDeps = async (
): Promise<Record<string, string>> => {
const latestDeps: Record<string, string> = {};

for (const [name, version] of Object.entries(deps)) {
for (const [name, range] of Object.entries(deps)) {
try {
const range = USE_RC_VERSIONS.includes(name) ? 'rc' : version;
const latestVersion = await getLatestVersion(name, { range });
latestDeps[name] = latestVersion ? `^${latestVersion}` : '*';
} catch {
Expand Down