Skip to content

Conversation

lobsterkatie
Copy link
Member

This splits the repo-level yarn clean command, which currently leaves the repo in a broken state (build artifacts deleted, and unable to be rebuilt because package-level node_modules folders - though not the top node_modules folder - have also been deleted), into a number of new, more focused commands. In the clean:deps command, it now deletes all node_modules folders (repo- and package-level) and reinstalls dependencies, so that the repo is no longer broken after running it. The new commands:

// Meant to be a useful default for day-to-day use
"clean": "run-p clean:build clean:caches"

// Runs all package-level clean commands, which delete build and testing artifacts
"clean:build": "lerna run --parallel clean"

// TODO: Are there other caches we should add here?
"clean:caches": "yarn rimraf eslintcache && yarn jest --clearCache"

// Nuke all node modules and reinstall dependencies
"clean:deps": "lerna clean --yes && rm -rf node_modules && yarn"

// insert "Clean all the things!" meme here
"clean:all": "run-p clean:build clean:caches clean:deps"

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.75 KB (-6.91% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 58.19 KB (-9.95% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.49 KB (-7.25% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 52.43 KB (-9.56% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.33 KB (-16.84% 🔽)
@sentry/browser - Webpack (minified) 61.44 KB (-24.82% 🔽)
@sentry/react - Webpack (gzipped + minified) 19.35 KB (-16.88% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 42.81 KB (-10.92% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.41 KB (-6.4% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.96 KB (-6.24% 🔽)

@lobsterkatie lobsterkatie merged commit 3534f15 into 7.x May 13, 2022
@lobsterkatie lobsterkatie deleted the kmclb-split-up-yarn-clean branch May 13, 2022 13:30
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone May 13, 2022
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
This splits the repo-level `yarn clean` command, which currently leaves the repo in a broken state (build artifacts deleted, and unable to be rebuilt because package-level `node_modules` folders - though not the top `node_modules` folder - have also been deleted), into a number of new, more focused commands. In the `clean:deps` command, it now deletes _all_ `node_modules` folders (repo- and package-level) and reinstalls dependencies, so that the repo is no longer broken after running it. The new commands:

```
// Meant to be a useful default for day-to-day use
"clean": "run-p clean:build clean:caches"

// Runs all package-level clean commands, which delete build and testing artifacts
"clean:build": "lerna run --parallel clean"

// TODO: Are there other caches we should add here?
"clean:caches": "yarn rimraf eslintcache && yarn jest --clearCache"

// Nuke all node modules and reinstall dependencies
"clean:deps": "lerna clean --yes && rm -rf node_modules && yarn"

// insert "Clean all the things!" meme here
"clean:all": "run-p clean:build clean:caches clean:deps"
```
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