Skip to content

Conversation

@tom-ridsdale
Copy link
Contributor

@tom-ridsdale tom-ridsdale commented Dec 12, 2025

Current problems

  • NPM packages published with main dist-tag instead of latest
  • GitHub releases marked as "Pre-release" instead of regular releases

After playing around with the dry-run functionality of semantic-release locally I found:

  • In a monorepo, semantic-release runs from each package directory (e.g., packages/embed/), not from the repo root.
  • cosmiconfig stops searching at the first package.json it finds, so it never reached the root .releaserc. This is not an issue in single-package repos where the config lives alongside the only package.json.
  • In a previous PR, the extends: ["semantic-release-monorepo"] was moved from .releaserc to a -e command line flag. This change assumed the root config would still be found, but due to the monorepo structure, it wasn't.
  • Therefore semantic-release used its default config, main wasn't the first branch in the list (maintenance patterns and master come first). This meant:
    • Channel defaulted to the branch name (main) instead of null
    • main: false was set (only the first branch in the list gets main: true)
    • This caused npm to use --tag main and GitHub to mark releases as pre-release.

Changes

  • Rather than trying to maintain the old/legacy structure, move to a new structure.
  • Created a shared config file at the repo root (release.config.base.js) with:
    • Valid JavaScript syntax (not JSON, so no quoting issues)
    • extends: ['semantic-release-monorepo'] included
    • channel: false on the main branch
  • Each package has a minimal release.config.js that imports the shared config, ensuring cosmiconfig finds it immediately when running from that package's directory.
  • Removed the -e flag from package scripts since extends... is now in the base config file.

@tom-ridsdale tom-ridsdale marked this pull request as ready for review December 12, 2025 11:41
@tom-ridsdale tom-ridsdale requested a review from a team as a code owner December 12, 2025 11:41
@github-actions
Copy link

github-actions bot commented Dec 12, 2025

TypeScript adoption

Current adoption level: 95.9%

joycevherck
joycevherck previously approved these changes Dec 12, 2025
@gitstream-cm
Copy link

gitstream-cm bot commented Dec 12, 2025

🥷 Code experts: tf-security

tf-security has most 👩‍💻 activity in the files.
tf-security has most 🧠 knowledge in the files.

See details

packages/embed-react/package.json

Activity based on git-commit:

tf-security
DEC
NOV
OCT
SEP
AUG
JUL 54 additions & 0 deletions

Knowledge based on git-blame:
tf-security: 88%

packages/embed/package.json

Activity based on git-commit:

tf-security
DEC
NOV
OCT
SEP
AUG
JUL 77 additions & 0 deletions

Knowledge based on git-blame:
tf-security: 93%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

@tom-ridsdale
Copy link
Contributor Author

tom-ridsdale commented Dec 12, 2025

The CI Standard Checks workflow is failing because I am adding .js files - Only TypeScript is allowed for new changes; migrate file or extract changes to TS file.

I tried adding them to .eslintignore but that didn't resolve the issue.

I am going to bypass this check given it's a one-time setup and it will only fail again if these files are changed.

@typeform-ops-gha
Copy link

[BOT] Preview available with hash 1ce9976a74d53cd71fafb34c9e03c4befc3689d4 here.

@sonarqubecloud
Copy link

@tom-ridsdale
Copy link
Contributor Author

@joycevherck Would you mind approving again? & Are you comfortable with me bypassing the failure?

@tom-ridsdale tom-ridsdale merged commit 9d782f7 into main Dec 12, 2025
19 of 22 checks passed
@tom-ridsdale tom-ridsdale deleted the feat/TU-33149 branch December 12, 2025 12:41
typeform-ops-gha pushed a commit that referenced this pull request Dec 12, 2025
# [@typeform/embed-v5.8.0](https://github.com/Typeform/embed/compare/@typeform/embed-v5.7.0...@typeform/embed-v5.8.0) (2025-12-12)

### Features

* **TU-33149:** Move to a new semantic release configuration file structure ([#723](#723)) ([9d782f7](9d782f7))
typeform-ops-gha pushed a commit that referenced this pull request Dec 12, 2025
# [@typeform/embed-react-v4.9.0](https://github.com/Typeform/embed/compare/@typeform/embed-react-v4.8.0...@typeform/embed-react-v4.9.0) (2025-12-12)

### Features

* **TU-33149:** Move to a new semantic release configuration file structure ([#723](#723)) ([9d782f7](9d782f7))
@typeform-ops-gha
Copy link

🎉 This PR is included in version @typeform/embed-react-v4.9.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants