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

Simplify the build pipeline #1385

Merged
merged 28 commits into from
May 8, 2024
Merged

Simplify the build pipeline #1385

merged 28 commits into from
May 8, 2024

Conversation

sndrs
Copy link
Member

@sndrs sndrs commented Apr 26, 2024

What are you changing?

updates the build/packages setup:

  • all packages are ES modules
  • builds them with rollup directly
    • removes @csnx/npm-package
  • uses rollup-plugin-esbuild and rollup-plugin-dts in place of rollup-plugin-ts
  • builds to local dist dirs and removes the paths config from tsconfig
  • removes unnecessary build and validate-dist tasks from packages that don't actually build anything (were just being copied to Nx's root dist dir)

Why?

All packages that depend on sibling packages in the repo now consume their real dist files, not .ts source files.

it also surfaces the rollup config and package.json for each package more clearly.

our previous typescript plugin created some weird type issues (we think it was the plugin). rollup-plugin-dts is more commonly used hopefully more robust!

Why is it so big?

we'd accumulated some tech debt that made each of these steps difficult to do alone - this was pairing/mobbing effort the whole team was involved in, so in effect it was reviewed in real time.

Co-authored-by: @oliverabrahams
Co-authored-by: @jamesmockett

Copy link

changeset-bot bot commented Apr 26, 2024

🦋 Changeset detected

Latest commit: 9275d89

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@guardian/source-react-components-development-kitchen Patch
@guardian/eslint-plugin-source-react-components Patch
@guardian/eslint-plugin-source-foundations Patch
@guardian/eslint-config-typescript Patch
@guardian/source-react-components Patch
@guardian/identity-auth-frontend Patch
@guardian/browserslist-config Patch
@guardian/source-foundations Patch
@guardian/cobalt-plugin-ts Patch
@guardian/newsletter-types Patch
@guardian/core-web-vitals Patch
@guardian/design-tokens Patch
@guardian/eslint-config Patch
@guardian/identity-auth Patch
@guardian/ab-react Patch
@guardian/prettier Patch
@guardian/tsconfig Patch
@guardian/ab-core Patch
@guardian/libs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sndrs sndrs changed the title make all packages modules, and build with pkgroll to local dist make all packages ES modules, and build with pkgroll to local dist Apr 26, 2024
@sndrs sndrs added the run_chromatic Runs chromatic when label is applied label Apr 26, 2024
@sndrs sndrs changed the base branch from main to sndrs/ts-not-incremental April 29, 2024 15:38
@sndrs sndrs marked this pull request as ready for review April 29, 2024 15:48
@sndrs sndrs requested review from a team as code owners April 29, 2024 15:48
@sndrs sndrs requested a review from a team April 29, 2024 15:48
@sndrs sndrs requested review from a team as code owners April 29, 2024 15:48
@sndrs sndrs added the 🐥 Canaries Triggers canary releases of any packages with changesets waiting. label Apr 29, 2024
@sndrs sndrs changed the title make all packages ES modules, and build with pkgroll to local dist Simplify the build pipeline May 7, 2024
@sndrs sndrs added the 🐥 Canaries Triggers canary releases of any packages with changesets waiting. label May 7, 2024
@sndrs sndrs removed the 🐥 Canaries Triggers canary releases of any packages with changesets waiting. label May 7, 2024
@sndrs sndrs merged commit 0382052 into main May 8, 2024
20 checks passed
@sndrs sndrs deleted the sndrs/esmodules branch May 8, 2024 09:05
@sndrs sndrs mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment