Skip to content

feat(v8): foundation for the major 8.0 release#5128

Merged
gnbm merged 16 commits into
major-8.0from
feat/major-8.0-setup
Jun 18, 2026
Merged

feat(v8): foundation for the major 8.0 release#5128
gnbm merged 16 commits into
major-8.0from
feat/major-8.0-setup

Conversation

@gnbm

@gnbm gnbm commented Jun 16, 2026

Copy link
Copy Markdown

Overview

Establishes the foundation for the v8 major release of @ionic/cli: the breaking-change documentation, the end-to-end major-release process, automated GitHub Releases, a hardened CI pipeline, full cross-platform support, and the TypeScript 5.9.3 upgrade.

Breaking-change documentation

  • Added BREAKING.md to log the v8 command removals, seeded with one entry per deprecated command (Appflow / Enterprise / Cordova), ready for each removal PR to fill in.
  • Introduced an archive convention so future majors are filed cleanly.

Major-release process

  • Documented how to cut a major release end-to-end: the publish mechanism, how @ionic/cli reaches 8.0.0, the path to publish from this branch, and how to validate safely before releasing (works on both Windows and macOS).

GitHub Releases on publish

  • Publishing now creates a GitHub Release automatically for every release, so the previously stale Releases page stays current.
  • Achieved by upgrading the release tooling from Lerna 3 → 5.

Safer, modernized CI

  • Locked all GitHub Actions to specific verified versions for supply-chain security.
  • Updated them to current releases, including replacing a cache action that GitHub had retired.

Works on Windows and macOS

  • Fixed pre-existing failures so the build, lint, and tests all pass on both Windows and macOS — previously lint and several tests only worked on Linux/macOS.

TypeScript 5.9.3 upgrade

  • Upgraded the whole codebase from TypeScript 4.8 → 5.9.3, along with the test toolchain (jest / ts-jest to v29), with no loss of functionality and continued Node 16 support.

Verification

✅ Certified green — build, lint, and the full test suite pass on Node 16, 18, and 24.

Important

Squash-merge this PR so the foundation work lands as a single commit on major-8.0.

gnbm added 6 commits June 16, 2026 17:29
…g-change docs

- Bump root lerna devDependency 3.13.3 -> 5.6.2 (matches ionic-framework)
- publish:ci passes --create-release github so Lerna creates a GitHub Release
  per published tag; cd.yml provides GH_TOKEN (built-in token, contents: write)
- Add BREAKING.md (+ BREAKING_ARCHIVE/ convention) seeding the v8 removed-command log
- Add .github/RELEASING.md major-release runbook
Pre-existing cross-platform issues surfaced while validating the Lerna 5
upgrade; none are caused by the release tooling:

- discover: pin netmask 2.0.2 and @types/netmask 2.0.5 — the untracked
  dependency tree had drifted to netmask 2.1.x, whose bundled types declare
  'broadcast: string | undefined' and broke the build (TS2322)
- replace the Unix-only 'lint': 'true' no-op with cross-platform 'exit 0' in
  all packages ('true' is not a cmd.exe builtin, so npm run lint failed on Windows)
- angular/cordova tests: normalize path separators in assertions and return the
  floating expect().resolves promises (fixes Windows path failures and the
  resulting jest-worker 'Call retries were exceeded' crash)
publish:testing is NOT a dry run — lerna publish runs npm publish (testing
dist-tag); --no-push only suppresses git. It also only runs from 'stable' due
to the allowBranch guard. Replace the §4 'dry run' step with a safe,
non-publishing 'lerna version --no-push --no-git-tag-version --allow-branch'
smoke test, and document the bump-from-commits behavior.
Security-harden workflows by pinning actions to immutable commit SHAs
(version in trailing comment), and update from v3:

- actions/checkout  v3 -> v6.0.3
- actions/setup-node v3 -> v6.4.0
- actions/cache      v3 -> v5.0.5 (v3 cache backend was retired by GitHub)
Upgrade the TypeScript toolchain across all packages:

- typescript    ~4.8.0  -> ~5.9.3
- ts-jest       ~26.3.0 -> ^29.4.11
- jest/jest-cli ^26.x   -> ^29.7.0  (stays on 29 to keep Node 16 support)
- @types/jest   ^26.x   -> ^29.5.14
- @types/node   ~16.0.0 -> ^16.18.126 (16.0.3 conflicted with TS 5.9 libs)
- tslib         ^2.0.1  -> ^2.8.1

Required code/config changes:
- jest.config.base.js: migrate ts-jest globals -> transform API, tsConfig -> tsconfig, explicit testEnvironment: node
- utils-array reduce(): annotate accumulator T|U + cast awaited result (TS 5.9 Awaited/NonNullable inference)
- tests: drop async from async-done callbacks (utils-fs), convert to async()+expect.assertions (utils-subprocess), spyOn().and.callFake -> jest.spyOn().mockImplementation (utils-network), legacyFakeTimers for timer-mock assertions (cli-framework-output)

Validated: build + lint + full test suite green.
The step-4 lerna version command used a bash-only backslash continuation and
$(git branch --show-current), which fail in PowerShell/cmd. Use a single-line
command with --allow-branch "*" (quoted so bash doesn't glob-expand it) so it
runs identically in PowerShell, cmd, bash, and zsh. Also scope the cleanup to
'git checkout -- packages' so it only discards lerna's version writes.
@gnbm gnbm force-pushed the feat/major-8.0-setup branch from 442d1e8 to e3a1b49 Compare June 16, 2026 16:31
@gnbm gnbm changed the title feat(v8): foundation setup for major 8.0 feat(v8): foundation for the major 8.0 release Jun 16, 2026

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Solid foundation start, but some requests

Comment thread .github/RELEASING.md Outdated
Comment thread .github/RELEASING.md Outdated
Comment thread packages/@ionic/discover/package.json Outdated
Comment thread BREAKING.md
gnbm and others added 5 commits June 17, 2026 23:12
Co-authored-by: Shane <shane@shanessite.net>
netmask was pinned to an exact 2.0.2 to dodge a TS2322 build break. The
break originates from netmask >= 2.1, which ships its own bundled type
declarations (broadcast: string | undefined) that shadow @types/netmask
entirely — so pinning @types/netmask alone does not fix it.

Instead, restore the caret (^2.0.2) so the runtime can receive 2.x
patches, drop the now-shadowed @types/netmask dev dependency, and handle
the nullable broadcast in computeBroadcastAddress (broadcast is absent
for /31 and /32 blocks; fall back to the network address).

Validated: discover build + tests green with netmask 2.1.1.
The pre-publish validation note referenced a "bundled jest 26 worker"
caveat that is stale on this branch (it ships jest 29). jest 29 supports
newer Node than 26 did, so drop the caveat and state the validated
matrix: Node 18 to match CI, with the suite also green on Node 16 and 24.
The v8 BREAKING.md entries are seeded placeholders that each removal PR
fills in. Add a guard to the stable publish pipeline that fails if any
<TODO marker remains, so the "each removal PR fills it in" contract is
enforced rather than risking placeholders shipping to users at 8.0.0.
Mirror the Ionic Framework PR template so contributors get a consistent
structure: issue reference, current/new behavior, a breaking-change
checkbox with migration guidance, and an other-information section. The
breaking-change note points at this repo's BREAKING.md and the
Conventional Commits footer format used by the publish pipeline.
@gnbm gnbm requested a review from ShaneK June 17, 2026 23:06

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for resolving those issues! Looks like a good foundation

Comment thread .github/RELEASING.md Outdated
Comment thread .github/RELEASING.md Outdated
Comment thread .github/RELEASING.md Outdated
Comment thread .github/RELEASING.md Outdated
gnbm and others added 5 commits June 18, 2026 23:20
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Enforce the supported runtime through package.json rather than leaving it
to documentation. Set engines.node to ">=18.0.0" across the monorepo: the
root workspace, every published @ionic/* package, and the previously unset
@ionic/discover and cli-scripts manifests.

Align the rest of the toolchain with the new baseline — drop Node 16.x
from the CI matrix (now 18.x and 20.x) and update the release runbook so
the recommended and minimum Node versions no longer disagree.

BREAKING CHANGE: Node 16 is no longer supported. The Ionic CLI and its
@ionic/* packages now require Node 18 or newer.
The step-3 drift guard still described the old netmask@2.0.2 +
@types/netmask@2.0.5 pins. That approach was replaced: netmask floats at
^2.0.2 (resolving to 2.1.x) using its own bundled types, @types/netmask
was dropped, and computeBroadcastAddress handles the nullable broadcast.
Update the note to match.
Stop hardcoding specific Node versions in the runbook. Reference the
authoritative sources instead — `engines.node` in package.json for the
minimum and the `node:` matrix in ci.yml (plus `node-version` in cd.yml)
for the versions CI exercises — so the doc stays correct when CI's Node
versions change without a separate edit.
@gnbm gnbm requested a review from thetaPC June 18, 2026 22:48

@thetaPC thetaPC left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@gnbm gnbm merged commit cc6cc41 into major-8.0 Jun 18, 2026
4 checks passed
@gnbm gnbm deleted the feat/major-8.0-setup branch June 18, 2026 22:55
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