Skip to content

Commit

Permalink
Merge pull request #1332 from tarsinzer/new
Browse files Browse the repository at this point in the history
fix: script "new"
  • Loading branch information
tarsisexistence authored Jun 4, 2022
2 parents f2bdc6c + e3f1275 commit 7448030
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monoreact",
"version": "0.34.0",
"version": "0.35.0",
"description": "React workspaces implementation",
"license": "MIT",
"main": "./dist/bundle.cjs",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/bin/scaffolding/new.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const resolveOptions = async ({
const shouldChooseDifferentPath = fs.existsSync(dir) && (await chooseDifferentPathConfirmation(dir)) === 'Yes';

if (!shouldChooseDifferentPath) {
return { projectDir: dir, projectName: name };
return { projectDir: dir, projectName: dir.split(path.sep).pop() ?? 'project' };
}

const projectName = await getProjectName(name);
Expand Down
10 changes: 5 additions & 5 deletions cli/src/shared/constants/package.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const WORKSPACE_ROOT_PACKAGE_JSON: CLI.Package.HostPackageJSON = {
dependencies: {
react: '^17.0.2',
'react-dom': '^17.0.2',
'react-scripts': '5.0.0'
'react-scripts': '5.0.1'
},
devDependencies: {
monoreact: 'latest',
Expand All @@ -65,8 +65,8 @@ export const WORKSPACE_ROOT_PACKAGE_JSON: CLI.Package.HostPackageJSON = {
'@testing-library/user-event': '^13.5.0',
'web-vitals': '^2.1.2',
'@types/jest': '^27.0.3',
'@types/react': '^17.0.37',
'@types/react-dom': '^17.0.11',
'@types/react': '^17.0.45',
'@types/react-dom': '^17.0.17',
'@types/node': packageJson.devDependencies['@types/node'],
'@typescript-eslint/eslint-plugin': '5.7.0',
'@typescript-eslint/parser': '5.7.0',
Expand All @@ -81,8 +81,8 @@ export const WORKSPACE_ROOT_PACKAGE_JSON: CLI.Package.HostPackageJSON = {
'eslint-plugin-sonarjs': '0.11.0',
'eslint-plugin-jsx-a11y': packageJson.dependencies['eslint-plugin-jsx-a11y'],
husky: '4.3.8',
'lint-staged': '12.1.2',
prettier: '2.5.1',
'lint-staged': '12.5.0',
prettier: '2.6.2',
stylelint: '14.1.0',
'stylelint-config-recommended': '3.0.0',
tslib: packageJson.dependencies.tslib,
Expand Down

0 comments on commit 7448030

Please sign in to comment.