Skip to content

ref(dev): Use lerna exec for top-level link:yarn yarn script #5084

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

Merged
merged 1 commit into from
May 12, 2022

Conversation

lobsterkatie
Copy link
Member

Many of our packages have a link:yarn yarn script, which runs yarn link. At first this is puzzling (why is it better to type yarn link:yarn than yarn link?) until you realize that they're only there in aid of the repo-level link:yarn script, which allows you to set up the entire repo for linking into a test project in one go. Convenient! But also accomplishable without all of the package-level scripts, by switching from lerna run to lerna exec, which will run a shell command in every package. This makes that change, and removes the unnecessary package-level scripts.

(While it's true that this means that yarn link is run in the two integration test packages (where it wasn't before), that's a harmless change, as all yarn linnk actually does is create a symlink in ~/.config/yarn/link/.)

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.78 KB (-6.77% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 58.38 KB (-9.65% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.54 KB (-6.98% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 52.61 KB (-9.26% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.33 KB (-16.83% 🔽)
@sentry/browser - Webpack (minified) 61.47 KB (-24.77% 🔽)
@sentry/react - Webpack (gzipped + minified) 19.35 KB (-16.87% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 42.81 KB (-10.91% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.43 KB (-6.3% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23 KB (-6.05% 🔽)

@lobsterkatie lobsterkatie merged commit d9722dc into 7.x May 12, 2022
@lobsterkatie lobsterkatie deleted the kmclb-use-exec-for-yarn-link-script branch May 12, 2022 08:18
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone May 12, 2022
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
Many of our packages have a `link:yarn` yarn script, which runs `yarn link`. At first this is puzzling (why is it better to type `yarn link:yarn` than `yarn link`?) until you realize that they're only there in aid of the repo-level `link:yarn` script, which allows you to set up the entire repo for linking into a test project in one go. Convenient! But also accomplishable without all of the package-level scripts, by switching from `lerna run` to `lerna exec`, which will run a shell command in every package. This makes that change, and removes the unnecessary package-level scripts.

(While it's true that this means that `yarn link` is run in the two integration test packages (where it wasn't before), that's a harmless change, as all `yarn linnk` actually does is create a symlink in `~/.config/yarn/link/`.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants