diff --git a/.changeset/breezy-geese-remain.md b/.changeset/breezy-geese-remain.md deleted file mode 100644 index 3ab2d7e6..00000000 --- a/.changeset/breezy-geese-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'ember-headless-form': patch ---- - -Add `@ignoreNativeValidation` for opting out of native validation diff --git a/.changeset/config.json b/.changeset/config.json index 9415581d..0c46eda8 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -15,4 +15,8 @@ "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": ["test-app", "docs-app"] + "bumpVersionsWithWorkspaceProtocolOnly": true, + "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { + "onlyUpdatePeerDependentsWhenOutOfRange": true + } } diff --git a/.changeset/four-squids-change.md b/.changeset/four-squids-change.md deleted file mode 100644 index a0f5e25e..00000000 --- a/.changeset/four-squids-change.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'ember-headless-form-changeset': major ---- - -Add `ember-headless-form-changeset` addon - -Provides a helper that can be used to connect the validation capabilities of a `Changeset` object from [ember-changeset](https://github.com/poteto/ember-changeset) (and thus also [ember-changeset-validations](https://github.com/poteto/ember-changeset-validations/)) to ember-headless-form. diff --git a/.changeset/heavy-experts-wonder.md b/.changeset/heavy-experts-wonder.md deleted file mode 100644 index 00edc08b..00000000 --- a/.changeset/heavy-experts-wonder.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'ember-headless-form': patch ---- - -Yield `rawErrors` for custom error rendering - -Both the form and each field yield a `rawErrors` property that gives access to the raw validation error objects for custom error rendering. diff --git a/.changeset/nervous-hairs-mix.md b/.changeset/nervous-hairs-mix.md deleted file mode 100644 index 7516ad49..00000000 --- a/.changeset/nervous-hairs-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'ember-headless-form': patch ---- - -Refactor radio group for better a11y diff --git a/.changeset/orange-walls-run.md b/.changeset/orange-walls-run.md deleted file mode 100644 index 68c02324..00000000 --- a/.changeset/orange-walls-run.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'ember-headless-form-yup': major ---- - -Add `ember-headless-form-yup` addon - -Provides a helper that can be used to connect the validation capabilities of [yup](https://github.com/jquense/yup) to ember-headless-form. diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index b3db8b68..00000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "mode": "pre", - "tag": "beta", - "initialVersions": { - "ember-headless-form": "0.0.0", - "test-app": "0.0.0", - "docs-app": "0.0.0", - "sync-pnpm": "0.0.0", - "ember-headless-form-changeset": "0.0.0", - "ember-headless-form-yup": "0.0.0" - }, - "changesets": [ - "four-squids-change", - "heavy-experts-wonder", - "orange-walls-run", - "silly-cougars-decide", - "ten-mirrors-repair" - ] -} diff --git a/.changeset/silly-cougars-decide.md b/.changeset/silly-cougars-decide.md deleted file mode 100644 index 5d442e2d..00000000 --- a/.changeset/silly-cougars-decide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'ember-headless-form': major ---- - -Initial release diff --git a/.changeset/ten-mirrors-repair.md b/.changeset/ten-mirrors-repair.md deleted file mode 100644 index ec0f69b6..00000000 --- a/.changeset/ten-mirrors-repair.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'ember-headless-form': patch ---- - -Use describedby instead of errormessage ARIA attribute - -Support for `aria-errormessage` is [very incomplete across screen readers](https://a11ysupport.io/tech/aria/aria-errormessage_attribute), therefore switching to the [better supported](https://a11ysupport.io/tech/aria/aria-describedby_attribute), but less specific `aria-describedby`. diff --git a/.changeset/twenty-tips-lie.md b/.changeset/twenty-tips-lie.md new file mode 100644 index 00000000..f203dc91 --- /dev/null +++ b/.changeset/twenty-tips-lie.md @@ -0,0 +1,5 @@ +--- +'ember-headless-form': patch +--- + +Fixes a bug where if the submit button is clicked multiple times with async validation present the submit callback would trigger. Now if there is pending validation the submit will be cancelled to avoid extra calls. diff --git a/.github/actions/pnpm/action.yml b/.github/actions/pnpm/action.yml index ce834115..ad3e3f6c 100644 --- a/.github/actions/pnpm/action.yml +++ b/.github/actions/pnpm/action.yml @@ -1,22 +1,14 @@ name: Setup node and pnpm description: Setup node and install dependencies using pnpm runs: - using: "composite" + using: 'composite' steps: - - uses: pnpm/action-setup@v2.2.4 - with: - version: 7 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4.0.0 + - uses: actions/setup-node@v4 with: cache: 'pnpm' - name: 'Install dependencies' shell: 'bash' run: | pnpm -v - pnpm install --fix-lockfile - git_diff=$(git diff) - if [[ "$git_diff" -eq "" ]]; then - echo "Success: no lockfile differences" ; - else - echo "Error: lockfile differences detected"; - fi + pnpm install diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 8f20c3dc..90c278ae 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -9,6 +9,7 @@ // bump for apps // update-lockfile for addons/libraries "rangeStrategy": "update-lockfile", + "prConcurrentLimit": 20, // From the docs: // https://docs.renovatebot.com/configuration-options/#packagerules // Important to know: Renovate will evaluate all packageRules and not stop once it gets a first match. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7456ff3c..b4aeeb28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,9 @@ jobs: name: Install runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 + uses: felixmosh/turborepo-gh-artifacts@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/pnpm @@ -35,9 +35,9 @@ jobs: needs: - install_dependencies steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 + uses: felixmosh/turborepo-gh-artifacts@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/pnpm @@ -55,13 +55,15 @@ jobs: fail-fast: true matrix: typescript-scenario: - - typescript@4.8 - - typescript@4.9 + - typescript@5.4 + - typescript@5.5 + - typescript@5.6 + - typescript@5.7 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 + uses: felixmosh/turborepo-gh-artifacts@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/pnpm @@ -78,9 +80,9 @@ jobs: needs: - install_dependencies steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 + uses: felixmosh/turborepo-gh-artifacts@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/pnpm @@ -93,9 +95,9 @@ jobs: needs: - install_dependencies steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 + uses: felixmosh/turborepo-gh-artifacts@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/pnpm @@ -123,9 +125,9 @@ jobs: - "'ember-release + embroider-optimized'" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 + uses: felixmosh/turborepo-gh-artifacts@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/pnpm @@ -146,15 +148,15 @@ jobs: - try_scenarios steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: persist-credentials: false - name: TurboRepo local server - uses: felixmosh/turborepo-gh-artifacts@v2 + uses: felixmosh/turborepo-gh-artifacts@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/pnpm - - run: pnpm build + - run: pnpm build:packages - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 @@ -176,7 +178,7 @@ jobs: deployments: write pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: persist-credentials: false - uses: ./.github/actions/pnpm @@ -196,4 +198,4 @@ jobs: ## Preview URLs Env: ${{ steps.publishStep.outputs.environment }} Docs: ${{ steps.publishStep.outputs.url }} -# # api docs: ${{ steps.publishStep.outputs.url }}/api/modules.html +# # api docs: ${{ steps.publishStep.outputs.url }}/api/modules.html \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..f301fedf --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +auto-install-peers=false diff --git a/.prettierrc.js b/.prettierrc.js index f9f8cd21..ef60ba9b 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -4,4 +4,20 @@ module.exports = { plugins: ['prettier-plugin-ember-template-tag'], singleQuote: true, templateSingleQuote: false, + // this was required to make the VSCode + Prettier work correctly with