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

chore!: Merge packages #881

Merged
merged 39 commits into from
May 31, 2023
Merged

chore!: Merge packages #881

merged 39 commits into from
May 31, 2023

Conversation

arelra
Copy link
Member

@arelra arelra commented May 23, 2023

What does this change?

Merges @guardian/commercial-core and @guardian/commercial-bundle

Main changes:

  • commercial-core and commercial-bundle no longer exist and are replaced by a single repo commercial
  • align tsconfig, eslint and prettier rules
  • core now lives under src/core
  • core has its own tsconfig.core.json to output in dist/ when building
  • the dist directory now comprises of:
    • dist/bundle/
    • dist/cjs/
    • dist/esm/
  • e2e package merged and flattened
  • @guardian/commercial will start at v8.0.0 which should avoid any clashes with previous tags and versions

Other:

  • where possible moved types to modules rather than ambient declarations
  • removed path aliases and use baseUrl: 'src' so instead you can import from core/ or projects/

Follow up:

  • the only TypeScript rule that has not been aligned is noUncheckedIndexedAccess which is true for core but not the main source. This is has been ticketed as a follow up piece of work.

Why?

Having separate core and bundle repos is primarily a legacy of having our code live across commercial and frontend repos. Core was intended to be a library of pure functions with stricter TypeScript rules. However since moving all code from frontend into commercial this distinction is less clear and causes an overhead in managing the two repos separately. By merging the two repos and aligning as much of the compilation rules as possible we can alleviate the overhead and reduce the complexity of our release process.

@github-actions
Copy link
Contributor

🚀 @guardian/commercial-bundle-v5.1.1-beta.1 published to npm as a beta release

@arelra arelra force-pushed the ravi/merge-packages branch 2 times, most recently from 0158431 to 40a0bf4 Compare May 24, 2023 16:59
@arelra arelra added [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR and removed [beta] @guardian/commercial-bundle labels May 24, 2023
@github-actions
Copy link
Contributor

🚀 @guardian/commercial-v7.1.1-beta.0 published to npm as a beta release

@arelra arelra added [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR and removed [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR labels May 29, 2023
@github-actions
Copy link
Contributor

🚀 @guardian/commercial-v7.1.1-beta.1 published to npm as a beta release

@arelra arelra marked this pull request as ready for review May 30, 2023 12:54
@arelra arelra requested a review from a team as a code owner May 30, 2023 12:54
Copy link
Contributor

@chrislomaxjones chrislomaxjones left a comment

Choose a reason for hiding this comment

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

Amazing work!

I can't say I've scoured every single file in this review, but it all broadly looks good to me. I had a couple of non-blocking questions / suggestions as well.

.github/workflows/ci.yml Show resolved Hide resolved
src/core/__vendor/launchpad.js Show resolved Hide resolved
src/core/create-ad-slot.spec.ts Outdated Show resolved Hide resolved
src/projects/commercial/modules/dfp/Advert.spec.ts Outdated Show resolved Hide resolved
Copy link
Member

@Jakeii Jakeii left a comment

Choose a reason for hiding this comment

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

Nice, thanks for sorting this out and for the in person review + dev time!

@arelra arelra merged commit a8f7826 into main May 31, 2023
11 of 12 checks passed
@arelra arelra deleted the ravi/merge-packages branch May 31, 2023 08:47
@github-actions
Copy link
Contributor

🎉 This PR is included in version 8.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants