Skip to content

build: Yarn 4.18 and TypeScript 7 stable - #4322

Merged
erickzhao merged 9 commits into
electron:nextfrom
SpacingBat3:chore/typescript7
Aug 18, 2026
Merged

build: Yarn 4.18 and TypeScript 7 stable#4322
erickzhao merged 9 commits into
electron:nextfrom
SpacingBat3:chore/typescript7

Conversation

@SpacingBat3

@SpacingBat3 SpacingBat3 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Acknowledgements

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The test suite passes successfully on my local machine (if applicable).

Description

A very simple change set, to bump TypeScript to v7 (stable branch) while still keeping v6 for API compatibility (e.g. for TypeDoc, also see TypeStrong/typedoc#3098) and relevant packages in peerDependencies relationship.

The transition has been done according to recommendations in Typescript 7.0 announcement blog post.

This is only applicable to next IMHO as main still had no migration towards TSGO, so I assume this is not to be backported.

@SpacingBat3
SpacingBat3 requested a review from a team as a code owner July 17, 2026 00:27
@github-actions github-actions Bot added the next label Jul 17, 2026
@socket-security

socket-security Bot commented Jul 17, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

Note that like previously, TypeScript 6 is still used as API provider
until TypeScript 7 will be adopted by neccesary tooling.
@erickzhao

Copy link
Copy Markdown
Member

Thanks for this @SpacingBat3!!

@socket-security

socket-security Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​typescript/​typescript6@​6.0.21001005588100
Updatednpm/​typescript@​6.0.2 ⏵ 7.0.29910089 -1100100 +10

View full report

@erickzhao erickzhao changed the title chore(typescript): migrate from native-preview to stable TSv7 build: Yarn 4.18 and TypeScript 7 stable Aug 17, 2026
erickzhao and others added 3 commits August 17, 2026 17:05
Yarn 4.18 enables `npmMinimalAgeGate` by default (1440 minutes). The
Verdaccio harness publishes the monorepo to the local registry seconds
before the e2e suites install it, so every local package came back as
`YN0016: All versions satisfying "^8.0.0-alpha.10" are quarantined`,
deterministically failing the yarn variants of the template tests on all
three platforms. The npm and pnpm variants were unaffected.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
`create-electron-app` is the only publishable workspace in this repo that
the existing `@electron-forge/*` glob does not cover, so it stays
quarantined for a week after every release. The fuses fixture config
mirrors the root one but never picked up `@electron-internal/*`.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Yarn 4.18 disables install scripts by default (`enableScripts: false`),
so the pinned electron@41 never ran its `postinstall` in the generated
apps and `electron-forge start` failed with "Electron failed to install
correctly" for every `yarn` template variant.

Electron 42+ downloads the binary on demand instead of from an install
script, so pinning past 42 makes the tests independent of Yarn's script
policy.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@erickzhao erickzhao self-assigned this Aug 18, 2026
erickzhao and others added 2 commits August 18, 2026 11:17
The template e2e tests install into app directories created under
`os.tmpdir()`, which are outside this repository and so never pick up the
root `.yarnrc.yml`. To stop Yarn's default gate from quarantining the
`@electron-forge/*` packages we publish to Verdaccio seconds earlier, we
were switching the gate off for the whole test run, which also exempted
every third-party package the templates install.

Mirror the root config through the environment instead: keep the 1-week
gate and preapprove only our own packages, so a third-party package
published in the last week is still refused.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Yarn 4.18 added `approvedGitRepositories`, a glob allowlist checked
before Yarn hits a remote to resolve or fetch a dependency over the git
protocol. It defaults to an empty list, which refuses every git
dependency, and the 4.18 bump set it to `**` to preserve the old
behaviour.

We don't have a single git-protocol resolution in the lockfile, so take
the default instead of blanket-approving every host. Anyone who does need
one can add the specific repository.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@erickzhao

erickzhao commented Aug 18, 2026

Copy link
Copy Markdown
Member

Hey all, I fixed a bunch of CI issues as well as re-applied the yarn.lock changes:

As a follow-up, I realized that this wasn't set up properly for Verdaccio tests. I'll add it

@erickzhao
erickzhao merged commit a62a480 into electron:next Aug 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants