Skip to content

chore: upgrade projen to 0.101.20 and opt back in to the system shell - #646

Open
lym953 wants to merge 1 commit into
mainfrom
yiming.luo/upgrade-projen-0.101
Open

chore: upgrade projen to 0.101.20 and opt back in to the system shell#646
lym953 wants to merge 1 commit into
mainfrom
yiming.luo/upgrade-projen-0.101

Conversation

@lym953

@lym953 lym953 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What and why

Fixes the weekly upgrade workflow, failing since projen 0.101.20 shipped with dax: node: command not found.

The task bumps projen (^0.99.52^0.101.20) then re-runs yarn projen. projen 0.101.0 made its built-in shell the default for task commands and $(...) env vars (deliberate break), and the projen-generated PATH: $(yarn exec node --print process.env.PATH) can't resolve yarn/node under it.

The fix is the documented opt-out — project.tasks.shell = TaskShell.system() (see projen/projen#4783).

Silently-ignored options found along the way

Four options in .projenrc.js had been removed from projen's API and silently ignored (plain JS = no type error), so they were quietly doing nothing:

Old option Replacement What had broken
npmignore npmIgnoreOptions.ignorePatterns all 12 custom .npmignore entries vanished
scripts project.addTask(...) check-formatting task vanished (CI uses it)
releaseWorkflow: false release: false release.yml + bump/unbump tasks appeared; upgrade.yml renamed
mergify: false githubOptions.mergify now defaults to true

jsiiFqn, releaseEveryCommit, rebuildBot are gone with no replacement — dropped.

Other forced changes

.projenrc.js needs eslint.allowDefaultProjectFiles under 0.101's new projectService config, and tsconfig.dev.jsontsconfig.json + test/tsconfig.json is projen's new generated layout (no opt-out). yarn.lock moves only projen/dax/semver/yargs — no dep bumps ride along.

Verification

Locally: yarn projen upgrade exits 0 (the step that fails on main); yarn projen idempotent so anti-tamper passes; 240 tests + eslint + formatting clean; compile and package:js/python/go pass. package:java untested — no Maven locally; the integration-tests job covers it.

🤖 Generated with Claude Code

The weekly `upgrade` workflow has been failing since projen 0.101.20 was
released: projen 0.101.0 made its built-in cross-platform shell the default
for all task commands, conditions and `$(...)` env-var evaluation, and the
projen-generated `PATH: $(yarn exec node --print process.env.PATH)` env var
cannot resolve `yarn`/`node` under it, so `yarn projen` dies with
`dax: node: command not found`.

Take the opt-out documented in the 0.101.0 release notes:
`project.tasks.shell = TaskShell.system()`.

While pinning the new version, four options in .projenrc.js turned out to
have been removed from projen's API. Because .projenrc.js is plain JS,
unknown options are silently dropped rather than raising an error, so they
were being ignored:

- `npmignore` -> `npmIgnoreOptions.ignorePatterns` (all custom .npmignore
  entries had disappeared)
- `scripts` -> `project.addTask()` (the check-formatting task, used by CI,
  had disappeared)
- `releaseWorkflow: false` -> `release: false` (a release.yml workflow,
  bump/unbump tasks and a commit-and-tag-version dep had appeared, and
  upgrade.yml had been renamed to upgrade-main.yml)
- `mergify: false` -> `githubOptions.mergify: false` (now defaults to true)

`jsiiFqn`, `releaseEveryCommit` and `rebuildBot` are also gone and have no
replacement, so they are dropped.

projen 0.101 also switched the eslint config to typescript-eslint's
`projectService`, which only auto-registers a TypeScript projenrc as a loose
file, so `.projenrc.js` is registered explicitly via
`allowDefaultProjectFiles`.

The tsconfig split (tsconfig.dev.json -> tsconfig.json + test/tsconfig.json,
and the jsii `tsc` block -> `tsconfig` + `validateTsconfig`) is projen's new
generated layout and has no opt-out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lym953
lym953 marked this pull request as ready for review July 27, 2026 16:31
@lym953
lym953 requested a review from a team as a code owner July 27, 2026 16:31
@lym953
lym953 requested a review from ava-silver July 27, 2026 16:31
Comment thread .projenrc.js
"*.tar.gz",
"cdk.context.json",
],
npmignore: [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💭 maybe we should switch this to be a .ts file such that we catch these errors sooner

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.

2 participants