Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Fix "Invalid version null" issues by improved version detection #22642

Merged
merged 30 commits into from
Jun 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4154066
Add support for "@yarnpkg/fslib" and "@yarnpkg/libzip", and implement…
valentinpalkovic May 16, 2023
9c57628
Remove Angular 12 automigration
valentinpalkovic May 16, 2023
ed7813d
Read proper installed package version
valentinpalkovic May 19, 2023
6c06430
Fix lint
valentinpalkovic May 19, 2023
f3bc515
Remove unused import
valentinpalkovic May 19, 2023
ff9caf8
Take backslash paths into account
valentinpalkovic May 22, 2023
4fc7e9d
Await project type detection
valentinpalkovic May 22, 2023
32cce05
Await language detection
valentinpalkovic May 23, 2023
79c9724
Pass packageManager instead of packageJSON to detectLanguage
valentinpalkovic May 23, 2023
82d4e7a
Fix pnp/workspace related issues and read exact installed versions fr…
valentinpalkovic May 31, 2023
c226dcd
Get proper installed Storybook version
valentinpalkovic May 31, 2023
82f819e
Fix eslint plugin setup
valentinpalkovic May 31, 2023
5e2a357
Fix isNxProject function by returning boolean instead of number
valentinpalkovic May 31, 2023
f07c4c0
Fix error log
valentinpalkovic Jun 1, 2023
6aca79c
Fix test
valentinpalkovic Jun 1, 2023
a67383a
Fix return value of detectPnp
valentinpalkovic Jun 1, 2023
ec27b9b
Fix types
valentinpalkovic Jun 2, 2023
cf68d65
Remove comment
valentinpalkovic Jun 2, 2023
8f557f7
Add todo comment
valentinpalkovic Jun 2, 2023
e18f0dd
Merge branch 'next' into valentin/invalid-version-null
valentinpalkovic Jun 6, 2023
3789a2e
Merge branch 'next' into valentin/invalid-version-null
yannbf Jun 9, 2023
e724228
Merge branch 'next' into valentin/invalid-version-null
yannbf Jun 15, 2023
0a88f95
await removeDependencies
yannbf Jun 15, 2023
f786b0f
fix async logic in removeDependencies
yannbf Jun 15, 2023
bd00ccd
Merge branch 'next' into valentin/invalid-version-null
yannbf Jun 15, 2023
a884dcd
account for correct cwd in package proxies
yannbf Jun 15, 2023
33f8cc2
pass sandbox directory when adding stories
yannbf Jun 15, 2023
7d91a00
Merge branch 'next' into valentin/invalid-version-null
yannbf Jun 15, 2023
2c3be33
prebundle boxen
yannbf Jun 15, 2023
f00b9e0
Merge branch 'next' into valentin/invalid-version-null
yannbf Jun 15, 2023
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
20 changes: 10 additions & 10 deletions code/lib/cli/src/js-package-manager/JsPackageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export abstract class JsPackageManager {
packageJson?: PackageJson;
},
dependencies: string[]
): void {
): Promise<void> {
const { skipInstall } = options;

if (skipInstall) {
Expand All @@ -264,15 +264,15 @@ export abstract class JsPackageManager {
}
});

this.writePackageJson(packageJson);
} else {
try {
this.runRemoveDeps(dependencies);
} catch (e) {
logger.error('An error occurred while removing dependencies.');
logger.log(e.message);
throw new HandledError(e);
}
return this.writePackageJson(packageJson);
}

try {
return this.runRemoveDeps(dependencies);
yannbf marked this conversation as resolved.
Show resolved Hide resolved
} catch (e) {
logger.error('An error occurred while removing dependencies.');
logger.log(e.message);
throw new HandledError(e);
}
}

Expand Down