@express-zod-api/migration 27.0.0-beta.1 → 27.0.0

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.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import { ESLintUtils } from "@typescript-eslint/utils";
2
-
3
2
  //#region index.d.ts
4
- declare const theRule: ESLintUtils.RuleModule<"change" | "add" | "move" | "remove", [], unknown, ESLintUtils.RuleListener>;
3
+ declare const theRule: ESLintUtils.RuleModule<
4
+ "change" | "add" | "move" | "remove",
5
+ [],
6
+ unknown,
7
+ ESLintUtils.RuleListener
8
+ >;
5
9
  declare const _default: {
6
10
  rules: Record<`v${number}`, typeof theRule>;
7
11
  };
8
12
  //#endregion
9
- export { _default as default };
13
+ export { _default as default };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import{AST_NODE_TYPES as e,ESLintUtils as t}from"@typescript-eslint/utils";const n={integration:`${e.NewExpression}[callee.name="Integration"] > ${e.ObjectExpression}`},r=t=>t.type===e.Property&&!t.computed&&(t.key.type===e.Identifier||t.key.type===e.Literal&&typeof t.key.value==`string`),i=t=>t.key.type===e.Identifier?t.key.name:t.key.value,a=e=>Object.keys(e).reduce((t,r)=>Object.assign(t,{[n[r]]:e[r]}),{}),o=`v${`27.0.0-beta.1`?.split(`.`)[0]??`0`}`,s=t.RuleCreator.withoutDocs({name:o,meta:{type:`problem`,fixable:`code`,schema:[],messages:{change:`change {{ subject }} from {{ from }} to {{ to }}`,add:`add {{ subject }} to {{ to }}`,move:`move {{ subject }} to {{ to }}`,remove:`remove {{ subject }}`}},defaultOptions:[],create:t=>a({integration:n=>{if(n.properties.filter(r).find(e=>i(e)===`typescript`))return;let a=t.sourceCode.getAncestors(n).some(t=>t.type===e.AwaitExpression||(t.type===e.ArrowFunctionExpression||t.type===e.FunctionExpression||t.type===e.FunctionDeclaration)&&t.async);t.report(a?{node:n.parent,messageId:`change`,data:{subject:`constructor`,from:`new Integration()`,to:`await Integration.create()`},fix:e=>e.replaceText(n.parent,`(await Integration.create(${t.sourceCode.getText(n)}))`)}:{node:n,messageId:`add`,data:{subject:`typescript property`,to:`constructor argument`},fix:e=>[e.insertTextBeforeRange(t.sourceCode.ast.range,`import typescript from "typescript";
1
+ import{AST_NODE_TYPES as e,ESLintUtils as t}from"@typescript-eslint/utils";const n={integration:`${e.NewExpression}[callee.name="Integration"] > ${e.ObjectExpression}`},r=t=>t.type===e.Property&&!t.computed&&(t.key.type===e.Identifier||t.key.type===e.Literal&&typeof t.key.value==`string`),i=t=>t.key.type===e.Identifier?t.key.name:t.key.value,a=e=>Object.keys(e).reduce((t,r)=>Object.assign(t,{[n[r]]:e[r]}),{}),o=`v${`27.0.0`?.split(`.`)[0]??`0`}`,s=t.RuleCreator.withoutDocs({name:o,meta:{type:`problem`,fixable:`code`,schema:[],messages:{change:`change {{ subject }} from {{ from }} to {{ to }}`,add:`add {{ subject }} to {{ to }}`,move:`move {{ subject }} to {{ to }}`,remove:`remove {{ subject }}`}},defaultOptions:[],create:t=>a({integration:n=>{if(n.properties.filter(r).find(e=>i(e)===`typescript`))return;let a=t.sourceCode.getAncestors(n).some(t=>t.type===e.AwaitExpression||(t.type===e.ArrowFunctionExpression||t.type===e.FunctionExpression||t.type===e.FunctionDeclaration)&&t.async);t.report(a?{node:n.parent,messageId:`change`,data:{subject:`constructor`,from:`new Integration()`,to:`await Integration.create()`},fix:e=>e.replaceText(n.parent,`(await Integration.create(${t.sourceCode.getText(n)}))`)}:{node:n,messageId:`add`,data:{subject:`typescript property`,to:`constructor argument`},fix:e=>[e.insertTextBeforeRange(t.sourceCode.ast.range,`import typescript from "typescript";
2
2
 
3
3
  `),n.properties.length?e.insertTextBefore(n.properties[0],`typescript, `):e.replaceText(n,`{ typescript }`)]})}})});var c={rules:{[o]:s}};export{c as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@express-zod-api/migration",
3
- "version": "27.0.0-beta.1",
3
+ "version": "27.0.0",
4
4
  "license": "MIT",
5
5
  "description": "Migration scripts for express-zod-api",
6
6
  "repository": {
@@ -36,7 +36,9 @@
36
36
  "typescript-eslint": "^8.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@typescript-eslint/rule-tester": "^8.51.0"
39
+ "@typescript-eslint/rule-tester": "^8.51.0",
40
+ "typescript": "^5.9.3",
41
+ "dts-plugin": "^0.1.0"
40
42
  },
41
43
  "scripts": {
42
44
  "pretest": "tsc",