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

Build: Regen lockfile #17283

Merged
merged 14 commits into from Jan 21, 2022
Merged

Build: Regen lockfile #17283

merged 14 commits into from Jan 21, 2022

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Jan 19, 2022

Issue: regen lockfile

Let's see which issues come up.. We should address this sooner or later.

@nx-cloud
Copy link

nx-cloud bot commented Jan 19, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 1281fb5. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@ndelangen ndelangen self-assigned this Jan 19, 2022
@ndelangen ndelangen added the maintenance User-facing maintenance tasks label Jan 19, 2022
@ndelangen ndelangen changed the title upgrade yarn to 3.1.1 regen lockfile Jan 19, 2022
@@ -3,7 +3,7 @@ import { TransformOptions } from '@babel/core';
import { Configuration } from 'webpack';
import { findDistEsm, StorybookConfig } from '@storybook/core-common';

export function babelDefault(config: TransformOptions) {
Copy link
Member Author

Choose a reason for hiding this comment

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

If we provide the output type as well, we prevent issues where typescript 'gets confused' and tells you it can't use a non-exported type. bla is exporting X from 'bla bla' but cannot be named

@@ -74,7 +74,8 @@
},
"devDependencies": {
"@storybook/client-api": "6.5.0-alpha.21",
"@types/prompts": "^2.0.9"
"@types/prompts": "^2.0.9",
"webpack": "4"
Copy link
Member Author

Choose a reason for hiding this comment

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

So we recently added webpack 4 - 5 as a dep here, and so yarn is eager to install webpack 5 here, we can force it to install webpack 4 (and then de-dup it to the root, by adding a devDependency that equal to the rest of the repo.

Comment on lines +17 to +18
// TODO remove this hack
return h(Component as Parameters<typeof h>[0], props);
Copy link
Member Author

@ndelangen ndelangen Jan 19, 2022

Choose a reason for hiding this comment

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

So multiple conflicting version of vue typings exist and they are equal but not the same, and so typescript complains. Since they are equal anyway, I simply cast it. this should result the same when users use it (because it will be the type they have installed, I assume

Comment on lines +51 to +52
"react-router": "6.0.2",
"react-router-dom": "6.0.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

react-router > 6.0.2 actually uses TS4 features, which we can't parse.

@@ -24,6 +24,7 @@ module.exports = {
ignore: [
'./lib/codemod/src/transforms/__testfixtures__',
'./lib/postinstall/src/__testfixtures__',
'**/typings.d.ts',
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a typings file, it has no runtime elements, and so babel doesn't need to work on this file.

@@ -131,6 +131,7 @@
"require-from-string": "^2.0.2",
"rxjs": "^6.6.3",
"styled-components": "^5.2.1",
"sveltedoc-parser": "4.1.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

The newer version doesn't work correctly, some issue relating to a URL and eslint, strange. I made it an exact version in the devDependency, this way we have absolute control over the version WE use, but users can use whatever works for them.

@ndelangen
Copy link
Member Author

@shilman I wasn't expecting it to go green TBH

app/vue3/package.json Outdated Show resolved Hide resolved
Base automatically changed from tech/yarn-upgrade to next January 20, 2022 03:25
@shilman shilman changed the title regen lockfile Build: Regen lockfile Jan 20, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

@ndelangen if you get those last two comments handled (api + unnecessary vue3 deps), I'd love to merge this

# Conflicts:
#	app/react/package.json
#	examples/cra-kitchen-sink/package.json
#	examples/official-storybook/package.json
@ndelangen ndelangen merged commit c5a7c4d into next Jan 21, 2022
@ndelangen ndelangen deleted the tech/lockfile-regen branch January 21, 2022 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants