Conversation
Here’s what was done to clear **npm audit** and keep the repo building. ### Dependency & security changes - **Ran `npm audit fix`** (already applied ~37 fixes in the lockfile before the larger edits). - **Removed Babel 6** (`babel-core`, `babel-runtime`) and **deprecated Rollup plugins**; added **`@babel/core`**, **`@rollup/plugin-babel`**, **`@rollup/plugin-commonjs`**, **`@rollup/plugin-node-resolve`**. - **Rollup `^2.64` → `^4.59`** and **`rollup.config.mjs`** (ESM config, reads `package.json` with `fs` so Node 22+ JSON imports aren’t required). - **Jest `^27` → `^29`**, **`ts-jest` → `^29`**, **`@types/jest` → `^29`** (fixes the old **jsdom / `@tootallnate/once`** chain). - **Dropped unused `rollup-plugin-sass`** (it pulled an old **sass → chokidar** tree with noisy audit issues). - **`engines.node` → `>=18`** (required for Rollup 4). - **`overrides`** for **`lodash`**, **`tmp`**, **`trim-newlines`** (fixes **`commitizen` / `inquirer` / `meow`** paths without breaking **trash-cli** — `trim-newlines@5` broke **`meow`**). - **`cheerio` → `1.0.0-rc.12`** via **`overrides`** so **Enzyme 3** still resolves **`cheerio/lib/utils`** (npm was hoisting **cheerio@1.2.0**, which removed that path). - **`.babelrc`**: `@babel/plugin-proposal-class-properties` → **`@babel/plugin-transform-class-properties`** (and matching **devDependency**). ### `FormsProvider.tsx` Your working tree had **`FormsProvider.tsx` replaced by a few comment lines**, which broke the **Rollup** build (`FormsContext` missing). It was **restored from `git HEAD`**. If you still want that personal note, keep it outside this file or re-apply it after pulling the real component back from version control. ### Current status - **`npm audit`**: **0 vulnerabilities** - **`npm test`** and **`npm run build`**: **pass** If you want the Tiffany lines back *inside* the repo, say where (e.g. `README` or a private note file) and we can add them without touching the library entrypoints.
…supported. Moves publishing and changelog tagging to semantic-release via GitHub Actions, adds Dependabot for npm (`/` and `demo/`) and for GitHub Actions, and documents setup in `RELEASING.md` with a pointer from `README.md`. Swaps Enzyme/commitizen/standard-version for React Testing Library (`@testing-library/react`, `jest-dom`, `user-event`), turns on `jsdom` in `jest.config.js`, and replaces the placeholder `hello-world` test with `validations.test.ts`, `FormsProvider.engine.test.ts`, and `ClassyForm.test.tsx`. Drops the old `npm overrides` block from `package.json`. Adds `.github/workflows/release.yml`, `.github/dependabot.yml`, and `.releaserc.json`; trims `.npmignore` for release-related paths. Staged `package-lock.json` reflects the dependency churn. Includes a small change to `.vscode/settings.json` (demo folder exclude).
📝 WalkthroughWalkthroughThis pull request modernizes the project's build tooling, CI/CD, and testing infrastructure. Changes include migrating from Enzyme to Testing Library, implementing automated dependency updates via Dependabot and release automation via semantic-release, updating Jest configuration with jsdom environment, replacing Rollup configuration with an ES module variant, updating Node.js engine requirements from >=8.9 to >=18, and removing legacy Babel/build dependencies in favor of modern alternatives. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
Greptile SummaryThis PR modernizes the test and release infrastructure for Key changes:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant GH as GitHub (master push)
participant CI as release.yml job
participant SR as semantic-release
participant npm as npmjs.com (OIDC)
participant Repo as Git repo
Dev->>GH: git push master (Conventional Commit)
GH->>CI: Trigger release workflow
CI->>CI: npm ci
CI->>CI: npm test
CI->>CI: npm run build
CI->>SR: npx semantic-release
SR->>SR: Analyze commits → determine next semver
SR->>Repo: Update CHANGELOG.md, package.json, package-lock.json
SR->>npm: Publish via OIDC (no NPM_TOKEN)
SR->>GH: Create GitHub Release + tag
SR->>Repo: Push release commit [skip ci]
|
| on: | ||
| push: | ||
| branches: | ||
| - master |
There was a problem hiding this comment.
No CI workflow for pull requests
The only workflow in this repo is release.yml, which triggers exclusively on pushes to master. This means tests (npm test) and the build (npm run build) are never validated on pull requests before they are merged.
If a PR introduces a test regression or a broken build, it will only be caught during the release run — after the code is already on master — causing the release to fail.
Consider adding a lightweight CI workflow, for example:
# .github/workflows/ci.yml
name: CI
on:
pull_request:
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.14'
cache: npm
- run: npm ci
- run: npm test
- run: npm run buildThe release.yml job could then be simplified to skip the test/build steps (or keep them as a safety net), since CI already guards the branch.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (4)
rollup.config.mjs (1)
10-10: Add a fail-fast guard forpackage.jsonoutput fields.If
mainormoduleis missing, Rollup errors later and less clearly. Validate once up front.Proposed patch
const __dirname = dirname(fileURLToPath(import.meta.url)); const pkg = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8')); +if (!pkg.main || !pkg.module) { + throw new Error("package.json must define both 'main' and 'module' fields"); +}Also applies to: 29-37
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@rollup.config.mjs` at line 10, Add a fail-fast guard after parsing package.json (the const pkg = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8')) line) to validate that pkg.main and pkg.module (the output fields used later in the rollup config) are present and non-empty; if either is missing, throw or log a clear error and exit (so Rollup doesn't fail later with an opaque error). Also add the same check/guard covering the code paths around the output construction (the block referenced in lines 29-37) so both CJS and ESM outputs are validated up-front.src/ClassyForm.test.tsx (1)
37-37: Prefer user-level submit interaction over directfireEvent.submit.Testing Library recommends using real interactions—clicking a submit button through
userEventbetter reflects user behavior and reduces coupling to DOM queries. This also aligns with existing patterns in the test suite (e.g., line 97).Proposed patch
it('calls onSubmit when form is valid', async () => { const user = userEvent.setup(); const onSubmit = jest.fn(); const { container } = render( <ClassyForm<DemoForm> formFieldConfigs={[{ name: 'title', required: true }]} onSubmit={onSubmit} > {({ formFields }) => ( <> <label htmlFor="title">Title</label> <input id="title" value={formFields.title.value as string} onChange={formFields.title.onChange} /> <button type="submit">Save</button> </> )} </ClassyForm> ); await user.type(screen.getByLabelText('Title'), 'My title'); - fireEvent.submit(container.querySelector('form')!); + await user.click(screen.getByRole('button', { name: 'Save' })); expect(onSubmit).toHaveBeenCalledTimes(1); const [event, submittedFields] = onSubmit.mock.calls[0]; expect(event.defaultPrevented).toBe(false); expect(submittedFields.title.value).toBe('My title'); }); - it('prevents submit when invalid (required empty)', () => { + it('prevents submit when invalid (required empty)', async () => { + const user = userEvent.setup(); const onSubmit = jest.fn(); const { container } = render( <ClassyForm<DemoForm> formFieldConfigs={[{ name: 'title', required: true }]} onSubmit={onSubmit} > {({ formFields }) => ( <> <label htmlFor="title">Title</label> <input id="title" value={formFields.title.value as string} onChange={formFields.title.onChange} /> <button type="submit">Save</button> </> )} </ClassyForm> ); - fireEvent.submit(container.querySelector('form')!); + await user.click(screen.getByRole('button', { name: 'Save' })); expect(onSubmit).not.toHaveBeenCalled(); });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/ClassyForm.test.tsx` at line 37, Replace the direct call to fireEvent.submit(container.querySelector('form')!) in the ClassyForm test with a user-level interaction: locate the form's submit button (same element used elsewhere in this test suite) and trigger userEvent.click(submitButton) so the test exercises real user behavior; update any imports to ensure userEvent from '@testing-library/user-event' is used and remove the fireEvent.submit usage in the test in src/ClassyForm.test.tsx.jest.config.js (1)
5-7: Referencets-jestby package name instead of anode_modulespath.The documented
ts-jestconfig pointstransformat'ts-jest'(or['ts-jest', options]), and Jest resolves transform entries as module names or paths. Hard-coding<rootDir>/node_modules/ts-jestties this config to one install layout for no real benefit. (kulshekhar.github.io)♻️ Suggested change
transform: { - '\\.(ts|tsx)$': '<rootDir>/node_modules/ts-jest', + '^.+\\.tsx?$': 'ts-jest', },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@jest.config.js` around lines 5 - 7, Update the Jest transform entry to reference the ts-jest package by module name instead of a hard-coded node_modules path: in the transform object (the key '\\.(ts|tsx)$') replace '<rootDir>/node_modules/ts-jest' with 'ts-jest' (or ['ts-jest', options] if you need to pass options) so Jest resolves the transformer via package name rather than a fixed install layout.package.json (1)
53-53: Avoid pinning semantic-release’s bundled plugins separately.
semantic-releasealready bundles the default analyzer/notes/npm/GitHub plugins, and the npm plugin docs explicitly warn that re-declaring bundled plugins as direct dependencies can create upgrade conflicts. Keeping only the extra plugins here would reduce duplicate version management. (semantic-release.gitbook.io)♻️ Suggested cleanup
"@semantic-release/changelog": "^6.0.3", - "@semantic-release/commit-analyzer": "^13.0.0", "@semantic-release/git": "^10.0.1", - "@semantic-release/github": "^11.0.0", - "@semantic-release/npm": "^13.1.5", - "@semantic-release/release-notes-generator": "^14.0.1",Also applies to: 55-57
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 53, Remove the explicitly listed bundled semantic-release plugins from package.json (e.g. "@semantic-release/commit-analyzer" and the other semantic-release entries mentioned at lines 55-57) so you don't pin bundled dependencies; keep only non-bundled/extra semantic-release plugins if any, and rely on the semantic-release package to provide its default analyzer/notes/npm/GitHub plugins to avoid duplicate version management and upgrade conflicts.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release.yml:
- Around line 26-32: The workflow currently uses the "Setup Node.js" step but
doesn't guarantee npm >= 11.5.1; add a new step right after the Setup Node.js
step to ensure npm meets Trusted Publishing by activating/upgrading npm (for
example use Corepack to prepare/activate npm@>=11.5.1 or run a targeted npm
install) so publishing won't fail; reference the "Setup Node.js" step and add a
follow-up step that runs the npm upgrade/activation command before any publish
actions.
In `@RELEASING.md`:
- Around line 51-52: Update the sentence about Dependabot so it clarifies that
semantic-release's patch release behavior depends on the merge strategy
preserving the PR title; specifically, change the line that references
Dependabot using "fix(deps):" to say that when the merge strategy preserves that
title as the final commit subject on master (for example via squash or rebase)
those dependency updates typically produce a patch release, since GitHub's
default merge commit ("Merge pull request #...") will not match conventional
commit rules.
In `@src/FormsProvider.engine.test.ts`:
- Around line 66-73: Update the test to exercise the invalid→valid transition on
the same FormFields object: first create configs and a formFields via
initializeFormFields, set formFields.title.value to an invalid value (e.g.
empty) and call validateFormFields(configs) to generate errors, then mutate
formFields.title.value to a valid value ('hello') and call
validateFormFields(formFields, configs, true) again and assert result.allValid
is true and that formFields.title.errors is cleared and
formFields.title.hasError is false; this ensures validateFormFields properly
mutates/clears state on the same FormFields instance rather than relying on a
fresh object.
---
Nitpick comments:
In `@jest.config.js`:
- Around line 5-7: Update the Jest transform entry to reference the ts-jest
package by module name instead of a hard-coded node_modules path: in the
transform object (the key '\\.(ts|tsx)$') replace
'<rootDir>/node_modules/ts-jest' with 'ts-jest' (or ['ts-jest', options] if you
need to pass options) so Jest resolves the transformer via package name rather
than a fixed install layout.
In `@package.json`:
- Line 53: Remove the explicitly listed bundled semantic-release plugins from
package.json (e.g. "@semantic-release/commit-analyzer" and the other
semantic-release entries mentioned at lines 55-57) so you don't pin bundled
dependencies; keep only non-bundled/extra semantic-release plugins if any, and
rely on the semantic-release package to provide its default
analyzer/notes/npm/GitHub plugins to avoid duplicate version management and
upgrade conflicts.
In `@rollup.config.mjs`:
- Line 10: Add a fail-fast guard after parsing package.json (the const pkg =
JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8')) line) to
validate that pkg.main and pkg.module (the output fields used later in the
rollup config) are present and non-empty; if either is missing, throw or log a
clear error and exit (so Rollup doesn't fail later with an opaque error). Also
add the same check/guard covering the code paths around the output construction
(the block referenced in lines 29-37) so both CJS and ESM outputs are validated
up-front.
In `@src/ClassyForm.test.tsx`:
- Line 37: Replace the direct call to
fireEvent.submit(container.querySelector('form')!) in the ClassyForm test with a
user-level interaction: locate the form's submit button (same element used
elsewhere in this test suite) and trigger userEvent.click(submitButton) so the
test exercises real user behavior; update any imports to ensure userEvent from
'@testing-library/user-event' is used and remove the fireEvent.submit usage in
the test in src/ClassyForm.test.tsx.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5578caf3-f78a-4e0c-b7a1-9097fbb6a028
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonsrc/__tests__/__snapshots__/hello-world.test.tsx.snapis excluded by!**/*.snap
📒 Files selected for processing (16)
.babelrc.github/dependabot.yml.github/workflows/release.yml.npmignore.releaserc.jsonREADME.mdRELEASING.mdjest.config.jspackage.jsonrollup.config.jsrollup.config.mjssrc/ClassyForm.test.tsxsrc/FormsProvider.engine.test.tssrc/__tests__/hello-world.test.tsxsrc/setupTests.tssrc/validations.test.ts
💤 Files with no reviewable changes (2)
- rollup.config.js
- src/tests/hello-world.test.tsx
| # Trusted publishing: npm CLI ≥ 11.5.1 and Node ≥ 22.14.0 (see npm docs). @semantic-release/npm 13 aligns with that range. | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22.14' | ||
| cache: npm | ||
| registry-url: https://registry.npmjs.org |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Node.js 22.14.0 npm version bundled
💡 Result:
Node.js v22.14.0 bundles npm v10.9.2. [1]
🌐 Web query:
npm Trusted Publishing requirements minimum npm version
💡 Result:
For npm Trusted Publishing, the minimum npm CLI version is 11.5.1 (npm says “11.5.1 or later”). [1]
Related: if you’re using the npm trust CLI commands to manage trusted publishers, npm requires npm@11.10.0 or above. [2]
Sources:
[1] npm Docs — “Trusted publishing for npm packages”
[2] npm Docs — “npm-trust” command documentation
Pin an npm version that satisfies Trusted Publishing.
npm Trusted Publishing requires npm CLI >=11.5.1, but Node 22.14.0 bundles npm 10.9.2. The inline comment suggests the requirements are covered, but the publish step will fail because the Node version alone does not guarantee the minimum npm version.
🔧 Fix
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.14'
cache: npm
registry-url: https://registry.npmjs.org
+
+ - name: Upgrade npm for Trusted Publishing
+ run: npm install -g npm@^11.5.1📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Trusted publishing: npm CLI ≥ 11.5.1 and Node ≥ 22.14.0 (see npm docs). @semantic-release/npm 13 aligns with that range. | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.14' | |
| cache: npm | |
| registry-url: https://registry.npmjs.org | |
| # Trusted publishing: npm CLI ≥ 11.5.1 and Node ≥ 22.14.0 (see npm docs). `@semantic-release/npm` 13 aligns with that range. | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.14' | |
| cache: npm | |
| registry-url: https://registry.npmjs.org | |
| - name: Upgrade npm for Trusted Publishing | |
| run: npm install -g npm@^11.5.1 |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/release.yml around lines 26 - 32, The workflow currently
uses the "Setup Node.js" step but doesn't guarantee npm >= 11.5.1; add a new
step right after the Setup Node.js step to ensure npm meets Trusted Publishing
by activating/upgrading npm (for example use Corepack to prepare/activate
npm@>=11.5.1 or run a targeted npm install) so publishing won't fail; reference
the "Setup Node.js" step and add a follow-up step that runs the npm
upgrade/activation command before any publish actions.
| [Dependabot](.github/dependabot.yml) opens PRs monthly for npm (root and `demo/`) and GitHub Actions. PR titles use **`fix(deps):`** so merged dependency updates typically produce a **patch** release when you merge to **`master`**. | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check the current content of RELEASING.md around lines 51-52
wc -l RELEASING.mdRepository: cdeutsch/classy-forms
Length of output: 80
🏁 Script executed:
# Read the specific lines in question
sed -n '45,60p' RELEASING.mdRepository: cdeutsch/classy-forms
Length of output: 522
🏁 Script executed:
# Check if there's a semantic-release configuration in the repo
fd -t f "semantic-release|release-config" --hiddenRepository: cdeutsch/classy-forms
Length of output: 47
🏁 Script executed:
# Look for any .releaserc or similar config
find . -maxdepth 2 -type f \( -name ".releaserc*" -o -name "release.config.*" -o -name "package.json" \) 2>/dev/null | head -20Repository: cdeutsch/classy-forms
Length of output: 117
🏁 Script executed:
# Check package.json for release configuration
cat package.json | grep -A 30 "release"Repository: cdeutsch/classy-forms
Length of output: 1000
🏁 Script executed:
# Check the .releaserc.json configuration
cat .releaserc.jsonRepository: cdeutsch/classy-forms
Length of output: 525
🏁 Script executed:
# Check if there's any GitHub merge strategy configuration
cat .github/dependabot.ymlRepository: cdeutsch/classy-forms
Length of output: 625
🏁 Script executed:
# Search for any documentation about merge strategy or how commits are processed
rg "merge|commit|squash" RELEASING.mdRepository: cdeutsch/classy-forms
Length of output: 1048
Clarify merge strategy dependency for Dependabot release behavior.
semantic-release determines release type from commit messages that land on master. Dependabot sets the commit prefix to fix(deps):, but this only produces a patch release if the merge strategy preserves that message as the final commit subject. With GitHub's default merge strategy, the commit becomes "Merge pull request #..." and won't match semantic-release's conventional commit rules. Squash and rebase merges preserve the fix(deps): subject.
Update the text to specify that this patch release behavior depends on merge strategy, for example: "When the merge strategy preserves that title as the final commit subject on master (via squash/rebase), those updates typically produce a patch release."
🧰 Tools
🪛 LanguageTool
[uncategorized] ~51-~51: The official name of this software platform is spelled with a capital “H”.
Context: .... | major | ### Dependabot Dependabot opens PRs monthly for n...
(GITHUB)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@RELEASING.md` around lines 51 - 52, Update the sentence about Dependabot so
it clarifies that semantic-release's patch release behavior depends on the merge
strategy preserving the PR title; specifically, change the line that references
Dependabot using "fix(deps):" to say that when the merge strategy preserves that
title as the final commit subject on master (for example via squash or rebase)
those dependency updates typically produce a patch release, since GitHub's
default merge commit ("Merge pull request #...") will not match conventional
commit rules.
| it('reports allValid when field satisfies required', () => { | ||
| const configs: FormFieldConfig[] = [{ name: 'title', required: true }]; | ||
| const formFields: FormFields = initializeFormFields(configs); | ||
| formFields.title.value = 'hello'; | ||
| const result = validateFormFields(formFields, configs, true); | ||
| expect(result.allValid).toBe(true); | ||
| expect(formFields.title.hasError).toBe(false); | ||
| }); |
There was a problem hiding this comment.
Exercise the invalid→valid transition on the same formFields object.
validateFormFields mutates the existing formFields structure in place, but this case starts from a fresh valid field. A regression where a previously-invalid field keeps stale errors or hasError after the user fixes it would still pass here.
🧪 Suggested test shape
- it('reports allValid when field satisfies required', () => {
+ it('clears required errors once the field is fixed', () => {
const configs: FormFieldConfig[] = [{ name: 'title', required: true }];
const formFields: FormFields = initializeFormFields(configs);
+ expect(validateFormFields(formFields, configs, true).allValid).toBe(false);
formFields.title.value = 'hello';
const result = validateFormFields(formFields, configs, true);
expect(result.allValid).toBe(true);
expect(formFields.title.hasError).toBe(false);
+ expect(formFields.title.errors).toEqual([]);
});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| it('reports allValid when field satisfies required', () => { | |
| const configs: FormFieldConfig[] = [{ name: 'title', required: true }]; | |
| const formFields: FormFields = initializeFormFields(configs); | |
| formFields.title.value = 'hello'; | |
| const result = validateFormFields(formFields, configs, true); | |
| expect(result.allValid).toBe(true); | |
| expect(formFields.title.hasError).toBe(false); | |
| }); | |
| it('clears required errors once the field is fixed', () => { | |
| const configs: FormFieldConfig[] = [{ name: 'title', required: true }]; | |
| const formFields: FormFields = initializeFormFields(configs); | |
| expect(validateFormFields(formFields, configs, true).allValid).toBe(false); | |
| formFields.title.value = 'hello'; | |
| const result = validateFormFields(formFields, configs, true); | |
| expect(result.allValid).toBe(true); | |
| expect(formFields.title.hasError).toBe(false); | |
| expect(formFields.title.errors).toEqual([]); | |
| }); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/FormsProvider.engine.test.ts` around lines 66 - 73, Update the test to
exercise the invalid→valid transition on the same FormFields object: first
create configs and a formFields via initializeFormFields, set
formFields.title.value to an invalid value (e.g. empty) and call
validateFormFields(configs) to generate errors, then mutate
formFields.title.value to a valid value ('hello') and call
validateFormFields(formFields, configs, true) again and assert result.allValid
is true and that formFields.title.errors is cleared and
formFields.title.hasError is false; this ensures validateFormFields properly
mutates/clears state on the same FormFields instance rather than relying on a
fresh object.
Pull requests previously had no workflow running `npm test` or `npm run build`; only `release.yml` ran on pushes to `master`, so breakages could show up late. Adds `.github/workflows/ci.yml` (Node 22.14, `npm ci`, test, build) on `pull_request` and pushes to `master`. Documents the workflow and why the Release job still builds before publish in `RELEASING.md`.
Aligns the release workflow with npm Trusted Publishing (Node 22 still ships npm 10.x, so the global npm bump is required alongside Node ≥ 22.14), documents how Dependabot PR titles affect semantic-release when merge commits rewrite the subject, and trims duplicate semantic-release plugin pins so versions come from the main semantic-release dependency tree. Also resolves the Jest transformer via the `ts-jest` package name, adds upfront `package.json` `main`/`module` checks in `rollup.config.mjs`, tightens `validateFormFields` coverage on a single `FormFields` instance, and switches `ClassyForm` submit assertions to `userEvent` clicks on the Save button.
|
Which issues would you like to fix?
|
|
🎉 This PR is included in version 3.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
Release Notes
New Features
Chores