Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates @next2d/view-generator to support framework v4 by adjusting the generated View/ViewModel templates, raising the minimum Node.js recommendation, and bumping the package to v4.
Changes:
- Update generated View/ViewModel templates to match the framework v4 lifecycle/constructor expectations.
- Bump recommended Node version (18 → 22) and expand route name splitting to include
_. - Release/tooling updates: package version to
4.0.0, dependency bumps, and GitHub Actions workflow adjustments (Node 24, publish flow changes).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/index.ts |
Updates generator templates and Node version recommendation; adjusts routing key splitting. |
package.json |
Major version bump to 4.0.0 and devDependency updates. |
package-lock.json |
Lockfile updates to match dependency/version changes. |
.github/workflows/publish.yml |
Updates publish job setup and changes npm publish/auth approach. |
.github/workflows/lint.yml |
Updates CI Node/actions versions and npm setup steps. |
Comments suppressed due to low confidence (1)
src/index.ts:13
pc.red(...)is called as a standalone expression, so the error message is never printed and it also violates the repo’sno-unused-expressionsESLint rule. Useconsole.log/console.error(or otherwise consume the string) so users see the message and lint passes.
const recommendeVersion: number = 22;
const version: string = process.versions.node;
if (recommendeVersion > parseInt(version.split(".")[0])) {
pc.red(`You are running Node Version:${version}.
View Generator requires Node ${recommendeVersion} or higher.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * @param {${name}ViewModel} vm | ||
| * @constructor | ||
| * @public | ||
| */ | ||
| constructor () | ||
| constructor (vm) | ||
| { | ||
| super(); | ||
| super(vm); |
There was a problem hiding this comment.
In the generated JavaScript View template, the JSDoc references ${name}ViewModel but that symbol is not imported/defined in the file, so type-aware tooling will treat it as an unknown type. Consider using an inline import("./${name}ViewModel").${name}ViewModel JSDoc type (or add a type-only import pattern) so the annotation resolves without adding runtime coupling.
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-node@v5 | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "22.x" | ||
| node-version: 24 | ||
| registry-url: "https://registry.npmjs.org" | ||
| - run: npm install -g npm@latest | ||
| - run: npm install | ||
| - run: npm run release | ||
| - run: npm publish --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} No newline at end of file | ||
| - run: npm publish No newline at end of file |
There was a problem hiding this comment.
The publish workflow no longer provides an npm auth token (e.g., NODE_AUTH_TOKEN) but still runs npm publish. Unless this repo/package is configured for npm Trusted Publishing via OIDC, this will fail. Either restore token-based auth, or update the workflow to use the intended OIDC/trusted publishing flow (and keep only the minimum required permissions).
No description provided.