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

fix(prettier-config): avoid bundling TS build info and deps #51

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

mcous
Copy link
Member

@mcous mcous commented Dec 3, 2024

Overview

Small tweak to the publish settings for the prettier configs after examining the published bundles

  1. ci: release with pnpm publish instead of action #48
  2. feat(prettier-config)!: split configs and use direct dependencies #49
  3. 🌿 fix(prettier-config): avoid bundling TS build info and deps #51
  4. feat(eslint-config)!: split config packages #50
  5. TODO: Update ESLint packages to use ESLint v9 and flat configs

Change log

Switched from the files allowlist to an .npmignore blocklist since it's (apparently for my brain) a little less error prone

  • Remove **/* from files to prevent bundling node_modules into the tarball
  • Ignore *.tsbuildinfo

@mcous mcous changed the title fix(prettier): avoid bundling TS build info and deps fix(prettier-config): avoid bundling TS build info and deps Dec 3, 2024
Copy link
Member

@zaporter-work zaporter-work left a comment

Choose a reason for hiding this comment

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

Does npm implicitly not bundle folders named node_modules if it isn't in the included files? I notice it's not in the npmignore

@mcous
Copy link
Member Author

mcous commented Dec 3, 2024

Does npm implicitly not bundle folders named node_modules if it isn't in the included files? I notice it's not in the npmignore

Yup, there's a set of things that are always ignored by default: https://docs.npmjs.com/cli/v8/using-npm/developers#keeping-files-out-of-your-package.

Somehow, adding **/* told npm / pnpm to turn @viamrobotics/prettier-config into a bundledDependency of @viamrobotics/prettier-config-svelte. I'm not sure if this is an npm behavior or something specific to pnpm workspaces, but I hadn't seen it before. Regardless, a simple .npmignore gets things to where I expected them

@mcous mcous merged commit ff06fba into main Dec 3, 2024
3 checks passed
@mcous mcous deleted the fix/mcous/prettier-bundle branch December 3, 2024 16:12
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