@adobe-commerce/recaptcha 1.2.1-beta.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,76 @@
1
1
  # @adobe-commerce/recaptcha
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 24d7ffb: Add `COMPANY_CREATE` to the default reCAPTCHA form map for B2B company registration (`createCompany` badge id).
8
+
9
+ Global `setConfig()` now batches `recaptchaFormConfig` for company create alongside other storefront forms.
10
+
11
+ - 9cd299b: Upgrade TypeScript to 6.0 and ESLint to 9 (flat config)
12
+
13
+ ## What changed
14
+
15
+ ### TypeScript 4.7 → 6.0
16
+
17
+ - `tsconfig-base.json` updated with correct TS 6 defaults. Two new-default opt-outs are deferred as tech debt: `exactOptionalPropertyTypes` and `verbatimModuleSyntax`.
18
+ - `moduleResolution` changed from `"nodenext"` to `"bundler"` across all packages — the correct pairing for `module: "esnext"` in a Vite monorepo. Only `packages/elsie` keeps `"NodeNext"` (paired with `module: "NodeNext"` for its dual CJS/ESM output).
19
+ - `baseUrl` removed from all tsconfigs (deprecated in TS 6; `paths` resolves relative to the tsconfig file directly).
20
+ - `rootDir` added explicitly to `build-tools`, `event-bus`, `fetch-graphql`, and `recaptcha` tsconfigs (implicit `rootDir` deprecated in TS 6).
21
+ - `types: []` set in `tsconfig-base.json` to prevent ambient test types from leaking into declaration output. Each package's own `tsconfig.json` declares its `types` explicitly (`jest`, `node`, `vite/client`, etc.).
22
+ - `babel-plugin-tsconfig-paths` removed — it was a no-op in every package that listed it.
23
+ - `noUncheckedIndexedAccess` enabled — violations were few enough to fix in source.
24
+
25
+ ### ESLint 8 → 9 (flat config)
26
+
27
+ - `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` (v5) removed; replaced by the unified `typescript-eslint` v8 package.
28
+ - `eslint-config-preact` bumped to `^2.0.0` (ESLint 9 support).
29
+ - `eslint-config-prettier` bumped to `^10.0.0`.
30
+ - `eslint-plugin-mdx` bumped to `^3.8.1`. **ESLint 10 is not supported** — `eslint-plugin-mdx` vendors an internal ESLint API removed in v10; ESLint 9 is pinned until a fix is released.
31
+ - `globals` added (`^15.0.0`) for `languageOptions.globals` in flat config.
32
+ - Shared config (`packages/elsie/config/eslint.mjs`) rewritten as a flat-config array export.
33
+ - Per-package `.eslintrc.js` files deleted; replaced with `eslint.config.js` (ESM flat config).
34
+ - Several `typescript-eslint` v8 rules disabled to preserve prior behavior: `no-explicit-any`, `ban-ts-comment`, `no-unused-expressions`, `no-unsafe-function-type`, `no-require-imports`, `no-empty-object-type`. Tracked as tech debt.
35
+ - `reportUnusedDisableDirectives` disabled to avoid sweeping pre-existing inline disable comments.
36
+
37
+ ### `vite-plugin-dts` removed; replaced with custom `dtsPlugin`
38
+
39
+ `vite-plugin-dts@3.9.1` declared a `typescript <5.0` peer range and its v5 successor was incompatible with this monorepo's layout (cross-package sources, workspace symlinks, multi-`outDir`). It was removed and replaced with a thin custom Vite plugin at `packages/elsie/config/plugins/dts.mjs` (`dtsPlugin`) that runs `tsc` directly. The resulting `dist/` layout is identical to what v3.9 produced (147 `.d.ts` files, 12 top-level entry shims).
40
+
41
+ ### Module format standardization
42
+
43
+ All tooling config files now follow a consistent format:
44
+
45
+ - **ESLint / Jest / Vite configs** — ESM (`.js` in `"type":"module"` packages; `.mjs` in elsie).
46
+ - **Prettier** — JSON only (`@adobe-commerce/elsie/config/prettier.json` referenced via each package's `"prettier"` key). `prettier.config.*` files deleted from all packages.
47
+ - **elsie CLI** (`bin/**`) — intentionally stays CommonJS.
48
+
49
+ See `architecture/decisions/009-module-format.md` for the full convention.
50
+
51
+ ### `.elsie.js` → `.elsie.cjs`
52
+
53
+ The consumer project config file is renamed from `.elsie.js` to `.elsie.cjs`. With `"type":"module"` now required in consumer packages, a plain `.js` file is treated as ES module — making `module.exports` a SyntaxError and making `require()` in the elsie CLI fail with `ERR_REQUIRE_ESM`. The `.cjs` extension forces CommonJS regardless of the package's `"type"` field.
54
+
55
+ - `elsie generate config` now writes `.elsie.cjs`.
56
+ - The CLI (`bin/lib/config.js`) and `config/vite.mjs` both prefer `.elsie.cjs` and fall back to `.elsie.js` for packages not yet migrated.
57
+ - `.elsie.cjs` added to `.npmignore` in all consumer packages.
58
+
59
+ ## Consumer migration
60
+
61
+ See `docs/elsie-v2-migration.md` for the full step-by-step guide. Key actions:
62
+
63
+ 1. Add `"type": "module"` to `package.json`.
64
+ 2. Replace `.eslintrc.js` with `eslint.config.js` (ESM flat config importing from `@adobe-commerce/elsie/config/eslint.mjs`).
65
+ 3. Rename `.elsie.js` → `.elsie.cjs` (keep `module.exports` content as-is).
66
+ 4. Add `"prettier": "@adobe-commerce/elsie/config/prettier.json"` to `package.json`; delete `prettier.config.js`.
67
+ 5. Update `tsconfig.json`: remove `baseUrl`, add explicit `rootDir` and `types`.
68
+ 6. Add `tsconfig.build.json` for declaration emit (required by `dtsPlugin`).
69
+ 7. Convert `.elsie.js` imports in `.storybook/main.js` and `storybook-stories.js` to reference `.elsie.cjs`.
70
+
71
+ - Updated dependencies [9cd299b]
72
+ - @adobe-commerce/fetch-graphql@1.3.1
73
+
3
74
  ## 1.2.1-beta.0
4
75
 
5
76
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe-commerce/recaptcha",
3
- "version": "1.2.1-beta.0",
3
+ "version": "1.2.1",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Module allows to efficiently verify that users are humans, not bots or spammers",
6
6
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  "test:ci": "elsie test --config jest.config.js --passWithNoTests --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@adobe-commerce/fetch-graphql": "~1.3.1-beta.0"
16
+ "@adobe-commerce/fetch-graphql": "~1.3.1"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/grecaptcha": "*"