@eslint-react/shared 1.20.0-next.0 → 1.20.0-next.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.
package/dist/index.d.mts CHANGED
@@ -2216,7 +2216,18 @@ declare const decodeSettings: Memoized<(data: unknown) => {
2216
2216
  * @internal
2217
2217
  */
2218
2218
  declare const normalizeSettings: Memoized<(settings: ESLintReactSettings) => {
2219
- readonly additionalComponents: CustomComponentNormalized[];
2219
+ readonly additionalComponents: {
2220
+ attributes: {
2221
+ as: string;
2222
+ name: string;
2223
+ controlled?: boolean;
2224
+ defaultValue?: string;
2225
+ }[];
2226
+ re: RegExp;
2227
+ name: string;
2228
+ as?: string;
2229
+ selector?: string;
2230
+ }[];
2220
2231
  readonly components: Map<string, string>;
2221
2232
  readonly version: string;
2222
2233
  readonly importSource?: string;
package/dist/index.d.ts CHANGED
@@ -2216,7 +2216,18 @@ declare const decodeSettings: Memoized<(data: unknown) => {
2216
2216
  * @internal
2217
2217
  */
2218
2218
  declare const normalizeSettings: Memoized<(settings: ESLintReactSettings) => {
2219
- readonly additionalComponents: CustomComponentNormalized[];
2219
+ readonly additionalComponents: {
2220
+ attributes: {
2221
+ as: string;
2222
+ name: string;
2223
+ controlled?: boolean;
2224
+ defaultValue?: string;
2225
+ }[];
2226
+ re: RegExp;
2227
+ name: string;
2228
+ as?: string;
2229
+ selector?: string;
2230
+ }[];
2220
2231
  readonly components: Map<string, string>;
2221
2232
  readonly version: string;
2222
2233
  readonly importSource?: string;
package/dist/index.js CHANGED
@@ -1329,14 +1329,14 @@ function unsafeReadSettings(data) {
1329
1329
  return data?.["react-x"] ?? {};
1330
1330
  }
1331
1331
  var decodeSettings = createMemoizedFunction((data) => {
1332
- return tools.Data.struct({
1332
+ return {
1333
1333
  ...INITIAL_ESLINT_REACT_SETTINGS,
1334
1334
  ...parse(ESLintSettingsSchema, data)["react-x"] ?? {}
1335
- });
1335
+ };
1336
1336
  }, { isEqual: (a, b) => a === b });
1337
1337
  var normalizeSettings = createMemoizedFunction((settings) => {
1338
1338
  const additionalComponents = settings.additionalComponents ?? [];
1339
- return tools.Data.struct({
1339
+ return {
1340
1340
  ...settings,
1341
1341
  additionalComponents: additionalComponents.map((component) => ({
1342
1342
  ...component,
@@ -1352,8 +1352,8 @@ var normalizeSettings = createMemoizedFunction((settings) => {
1352
1352
  if (!/^[\w-]+$/u.test(name)) return acc;
1353
1353
  return acc.set(name, as);
1354
1354
  }, /* @__PURE__ */ new Map()),
1355
- version: tsPattern.match(settings.version).with(tsPattern.P.union(tsPattern.P.nullish, "", "detect"), () => localPkg.getPackageInfoSync("react")?.version).otherwise(tools.F.identity) ?? "19.0.0"
1356
- });
1355
+ version: tsPattern.match(settings.version).with(tsPattern.P.union(tsPattern.P.nullish, "", "detect"), () => localPkg.getPackageInfoSync("react")?.version ?? "19.0.0").otherwise(tools.F.identity)
1356
+ };
1357
1357
  }, { isEqual: shallowEqual });
1358
1358
  var defineSettings = tools.F.identity;
1359
1359
 
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
- import { F, Data } from '@eslint-react/tools';
2
+ import { F } from '@eslint-react/tools';
3
3
  import { getPackageInfoSync } from 'local-pkg';
4
4
  import pm from 'picomatch';
5
5
  import { match, P } from 'ts-pattern';
@@ -1323,14 +1323,14 @@ function unsafeReadSettings(data) {
1323
1323
  return data?.["react-x"] ?? {};
1324
1324
  }
1325
1325
  var decodeSettings = createMemoizedFunction((data) => {
1326
- return Data.struct({
1326
+ return {
1327
1327
  ...INITIAL_ESLINT_REACT_SETTINGS,
1328
1328
  ...parse(ESLintSettingsSchema, data)["react-x"] ?? {}
1329
- });
1329
+ };
1330
1330
  }, { isEqual: (a, b) => a === b });
1331
1331
  var normalizeSettings = createMemoizedFunction((settings) => {
1332
1332
  const additionalComponents = settings.additionalComponents ?? [];
1333
- return Data.struct({
1333
+ return {
1334
1334
  ...settings,
1335
1335
  additionalComponents: additionalComponents.map((component) => ({
1336
1336
  ...component,
@@ -1346,8 +1346,8 @@ var normalizeSettings = createMemoizedFunction((settings) => {
1346
1346
  if (!/^[\w-]+$/u.test(name)) return acc;
1347
1347
  return acc.set(name, as);
1348
1348
  }, /* @__PURE__ */ new Map()),
1349
- version: match(settings.version).with(P.union(P.nullish, "", "detect"), () => getPackageInfoSync("react")?.version).otherwise(F.identity) ?? "19.0.0"
1350
- });
1349
+ version: match(settings.version).with(P.union(P.nullish, "", "detect"), () => getPackageInfoSync("react")?.version ?? "19.0.0").otherwise(F.identity)
1350
+ };
1351
1351
  }, { isEqual: shallowEqual });
1352
1352
  var defineSettings = F.identity;
1353
1353
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "1.20.0-next.0",
3
+ "version": "1.20.0-next.1",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/rel1cx/eslint-react",
6
6
  "bugs": {
@@ -39,7 +39,7 @@
39
39
  "local-pkg": "^0.5.1",
40
40
  "picomatch": "^4.0.2",
41
41
  "ts-pattern": "^5.5.0",
42
- "@eslint-react/tools": "1.20.0-next.0"
42
+ "@eslint-react/tools": "1.20.0-next.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/picomatch": "^3.0.1",