openapi-typesafe-migrate 1.0.0-rc.7 → 1.0.0-rc.8
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/CHANGELOG.md +63 -0
- package/README.md +45 -24
- package/dist/cli/main.mjs +527 -151
- package/dist/cli/main.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# openapi-typesafe-migrate
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - When a bug of the tool would corrupt one file, only that file is left as it was: the report lists
|
|
8
|
+
it under "Skipped" with the reason and asks you to migrate it by hand, the other files are still
|
|
9
|
+
migrated (and written with `--write`), and the command exits with `1`. Before, such a bug stopped
|
|
10
|
+
the whole run and nothing was migrated.
|
|
11
|
+
|
|
12
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A CircleCI job now takes the `shell` of the executor it names (`executor: py` with
|
|
13
|
+
`executors.py.shell: /usr/bin/python3`), so the Python code of its steps is no longer rewritten as
|
|
14
|
+
a command line; a step that names an old package is listed as a manual step. The job's own `shell`
|
|
15
|
+
still wins.
|
|
16
|
+
|
|
17
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A Dockerfile `ARG` or `ENV` whose value has a shell default, such as
|
|
18
|
+
`ENV GEN=${GEN:-npx openapi-typescript}`, no longer stops the whole migration with "Edits overlap"
|
|
19
|
+
and exit code 1: the default is renamed once, like any other `ARG` or `ENV` value.
|
|
20
|
+
|
|
21
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A GitLab CI job named `openapi`, `swagger`, `asyncapi`, `overlay` or `arazzo` no longer makes the
|
|
22
|
+
whole `.gitlab-ci.yml` count as an API description, so its commands are migrated again. A YAML file
|
|
23
|
+
counts as an API description only when such a top-level key holds a version (`openapi: 3.1.0`), and
|
|
24
|
+
a CI config (`.gitlab-ci.yml`, a GitHub workflow, a CircleCI config, …) never does.
|
|
25
|
+
|
|
26
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - Old flags in a justfile recipe parameter default (`b *flags='-it':` with `{{gen}} f.yaml
|
|
27
|
+
{{flags}}`) are now reported, like the flags of a `flags := '-it'` variable. Before, the run failed
|
|
28
|
+
later with `CLI_FLAG_REMOVED`.
|
|
29
|
+
|
|
30
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A Makefile command that make computes, such as `$(or $(GEN),npx openapi-typescript) b.yaml -it`,
|
|
31
|
+
is now reported with the text you wrote. Before, the report showed a row of underscores instead.
|
|
32
|
+
|
|
33
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A path that names the `node_modules` folder of an old package itself (`"paths": { "a":
|
|
34
|
+
["./node_modules/openapi-fetch"] }` in a tsconfig, or an import of `../node_modules/openapi-fetch`)
|
|
35
|
+
is now reported, like a path to a file inside it.
|
|
36
|
+
|
|
37
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - Options passed to `openapiTS()` that take keys from another object (`{ ...base }`) are now checked
|
|
38
|
+
for legacy callbacks. When the file writes that object (`...{ transform }` or `const base = { … }`),
|
|
39
|
+
its `transform`, `postTransform` and `transformProperty` are listed as manual steps; a spread of an
|
|
40
|
+
object the tool cannot read (an import, a call) is listed too, so you can check it. Before, such
|
|
41
|
+
options were not reported at all.
|
|
42
|
+
|
|
43
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A justfile recipe whose first line is a shebang for another program (`#!/usr/bin/env python3`), and
|
|
44
|
+
code given on the command line (`python3 -c '…'`, `node -e "…"`, `ruby -e '…'`), are no longer
|
|
45
|
+
read as shell commands. When such code names an old package, it is listed as a manual step
|
|
46
|
+
("the script runs with python3, …"); before, it was neither changed nor reported, or a command
|
|
47
|
+
line inside it was rewritten.
|
|
48
|
+
|
|
49
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A rewritten `transform` whose type is declared outside the function now compiles: a TypeScript
|
|
50
|
+
node type in the type of its `const` (`const transform: (s: SchemaObject) => ts.TypeNode`), in a
|
|
51
|
+
JSDoc `@type` or in a JSDoc `@returns` becomes `string`, like the returns. Before, that type stayed
|
|
52
|
+
and the file no longer compiled. A declared type the tool cannot map, such as a local alias, keeps
|
|
53
|
+
the `transform`, which is listed as a manual step.
|
|
54
|
+
|
|
55
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - A launcher or install command written with its Windows file suffix (`npx.cmd openapi-typescript`,
|
|
56
|
+
`pnpm.exe exec …`, `npm.ps1 i openapi-fetch`) is now migrated like `npx`, `pnpm` and `npm`.
|
|
57
|
+
Before, the old name after it was only reported.
|
|
58
|
+
|
|
59
|
+
- [#107](https://github.com/openapi-typesafe/openapi-typesafe/pull/107) [`173c82c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/173c82c24fb8d59a5e3d4894596391dd48f2608f) Thanks [@fedorello](https://github.com/fedorello)! - The migration renames the old generator in GitHub Actions expressions again, such as
|
|
60
|
+
`run: ${{ inputs.generator || 'npx openapi-typescript' }} api.yaml` and
|
|
61
|
+
`npx ${{ inputs.pkg || 'openapi-typescript' }}`, and in input defaults of an `action.yml` or a
|
|
62
|
+
reusable workflow (`default: npx openapi-typescript`). The value of an expression comes from the
|
|
63
|
+
run, so old flags after it are listed as a manual step. Before, these places were neither changed
|
|
64
|
+
nor reported, and npx ran the old package after the migration.
|
|
65
|
+
|
|
3
66
|
## 1.0.0-rc.7
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -18,16 +18,16 @@ Run it with `npx` (or `pnpm dlx`, `yarn dlx`, `bunx`), not as a dependency: it u
|
|
|
18
18
|
|
|
19
19
|
## What it changes
|
|
20
20
|
|
|
21
|
-
| Where | Change
|
|
22
|
-
| -------------------------------------------------------------------------------------- |
|
|
23
|
-
| Every `package.json` and pnpm's `package.yaml` | `dependencies`, `devDependencies`, `peerDependencies` and `optionalDependencies` get the new names, with the version of this tool, in the style of the old range (see below). `catalog:` stays; a dependency on a local package (`workspace:`, `link:`, `file:`) keeps its name and is reported, and so do the imports of it in the files for which that manifest is the nearest one that declares the name, as Node resolves it. An `npm:` alias of an original package (`"my-fetch": "npm:openapi-fetch@^0.13"`) points at the new package. The keys of `peerDependenciesMeta` and `dependenciesMeta` and the names in `bundleDependencies` get the new names too, and so do bun's `catalog` and `catalogs`. The targets of subpath `imports` (`"#client": "openapi-fetch"`, under any conditions) get the new names; the `#` keys stay. So do the keys and values of the `browser` field (`"openapi-fetch": false`).
|
|
24
|
-
| `pnpm-workspace.yaml`, `.yarnrc.yml` | Entries of `catalog:` and `catalogs:` (pnpm, Yarn 4.10 and newer), ranges with spaces included.
|
|
25
|
-
| `deno.json`, `deno.jsonc`, `import_map.json` | Keys of `imports` and `scopes` that name an original package (`openapi-fetch`, `openapi-fetch/`), and their `npm:` values, also in the file a config names as its `importMap` (`"importMap": "./deps.json"`).
|
|
26
|
-
| `tsconfig.json`, `tsconfig.*.json`, `jsconfig.json` | The `compilerOptions.paths` keys of an original package (`"openapi-fetch/*"`) and its name in `compilerOptions.types`.
|
|
27
|
-
| Commands (the files are listed below the table) | The `openapi-typescript` command (also as `npx`, `pnpm exec`, `node_modules/.bin/…` or `npm:openapi-typescript`), and the flags it renamed, in that command only: `--immutable-types` / `-it` → `--immutable`, `--support-array-length` → `--array-length`, `--redoc` → `--redocly`, `-ap` → `--additional-properties`. The old package names in install commands (`npm i`, `pnpm add`, `npx -p`, …).
|
|
28
|
-
| `.github/dependabot.yml` | Every old package name in `dependency-name` and `patterns`.
|
|
29
|
-
| Sources (`.ts`, `.tsx`, `.js`, `.mjs`, `.cjs`, `.vue`, `.svelte`, `.astro`, `.mdx`, …) | Module specifiers only: `import` / `export … from`, `import()`, `require()`, `require.resolve()`, `import("…")` types and `@import` tags in JSDoc (every block), `declare module`, `/// <reference types>`, and module mocks: `vi.mock()` and the other `vi` / `jest` module methods (`jest.setMock()`, `jest.requireActual()`, …), bun's `mock.module()`. Components: their `<script>` blocks and Astro's frontmatter; MDX: its `import` / `export` blocks. A bundler query stays (`openapi-fetch?url`).
|
|
30
|
-
| `openapiTS(source, { transform })` calls | When `transform` is the only callback and returns plain `ts.factory` types (or the helper constants), the returns become type text and `irCallbacks: true` is added. The options may also be a `const` of the same file that only this call uses (without a type, the option is `irCallbacks: true as const`, which keeps the type `true` that the call needs); options or a named `transform` function that other code can reach (another use, or an export) are kept and reported. Module constants and imports that only the old returns used are removed; exported ones stay. Names are resolved by scope, so a local constant is never taken for a module one. Options declared as `OpenAPITSOptions` are declared as `OpenAPITSIrOptions` then.
|
|
21
|
+
| Where | Change |
|
|
22
|
+
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
23
|
+
| Every `package.json` and pnpm's `package.yaml` | `dependencies`, `devDependencies`, `peerDependencies` and `optionalDependencies` get the new names, with the version of this tool, in the style of the old range (see below). `catalog:` stays; a dependency on a local package (`workspace:`, `link:`, `file:`) keeps its name and is reported, and so do the imports of it in the files for which that manifest is the nearest one that declares the name, as Node resolves it. An `npm:` alias of an original package (`"my-fetch": "npm:openapi-fetch@^0.13"`) points at the new package. The keys of `peerDependenciesMeta` and `dependenciesMeta` and the names in `bundleDependencies` get the new names too, and so do bun's `catalog` and `catalogs`. The targets of subpath `imports` (`"#client": "openapi-fetch"`, under any conditions) get the new names; the `#` keys stay. So do the keys and values of the `browser` field (`"openapi-fetch": false`). |
|
|
24
|
+
| `pnpm-workspace.yaml`, `.yarnrc.yml` | Entries of `catalog:` and `catalogs:` (pnpm, Yarn 4.10 and newer), ranges with spaces included. |
|
|
25
|
+
| `deno.json`, `deno.jsonc`, `import_map.json` | Keys of `imports` and `scopes` that name an original package (`openapi-fetch`, `openapi-fetch/`), and their `npm:` values, also in the file a config names as its `importMap` (`"importMap": "./deps.json"`). |
|
|
26
|
+
| `tsconfig.json`, `tsconfig.*.json`, `jsconfig.json` | The `compilerOptions.paths` keys of an original package (`"openapi-fetch/*"`) and its name in `compilerOptions.types`. |
|
|
27
|
+
| Commands (the files are listed below the table) | The `openapi-typescript` command (also as `npx`, `pnpm exec`, `node_modules/.bin/…` or `npm:openapi-typescript`), and the flags it renamed, in that command only: `--immutable-types` / `-it` → `--immutable`, `--support-array-length` → `--array-length`, `--redoc` → `--redocly`, `-ap` → `--additional-properties`. The old package names in install commands (`npm i`, `pnpm add`, `npx -p`, …). |
|
|
28
|
+
| `.github/dependabot.yml` | Every old package name in `dependency-name` and `patterns`. |
|
|
29
|
+
| Sources (`.ts`, `.tsx`, `.js`, `.mjs`, `.cjs`, `.vue`, `.svelte`, `.astro`, `.mdx`, …) | Module specifiers only: `import` / `export … from`, `import()`, `require()`, `require.resolve()`, `import("…")` types and `@import` tags in JSDoc (every block), `declare module`, `/// <reference types>`, and module mocks: `vi.mock()` and the other `vi` / `jest` module methods (`jest.setMock()`, `jest.requireActual()`, …), bun's `mock.module()`. Components: their `<script>` blocks and Astro's frontmatter; MDX: its `import` / `export` blocks. A bundler query stays (`openapi-fetch?url`). |
|
|
30
|
+
| `openapiTS(source, { transform })` calls | When `transform` is the only callback and returns plain `ts.factory` types (or the helper constants), the returns become type text and `irCallbacks: true` is added. The options may also be a `const` of the same file that only this call uses (without a type, the option is `irCallbacks: true as const`, which keeps the type `true` that the call needs); options or a named `transform` function that other code can reach (another use, or an export) are kept and reported. Module constants and imports that only the old returns used are removed; exported ones stay. Names are resolved by scope, so a local constant is never taken for a module one. Options declared as `OpenAPITSOptions` are declared as `OpenAPITSIrOptions` then, and a node type declared for `transform` (its return type, the type of its `const`, a JSDoc `@type` or `@returns`) becomes `string`; a declared type the tool cannot map keeps the `transform`, which is reported. |
|
|
31
31
|
|
|
32
32
|
Commands are read in `package.json` scripts, shell scripts (`.sh`, `.bash`, `.zsh`), husky hooks,
|
|
33
33
|
`Makefile`, `justfile`, `Dockerfile`, CI and other YAML files, Nx `project.json` targets and
|
|
@@ -57,22 +57,35 @@ script sets itself (`GEN="npx openapi-typescript"`, also after `export`, `local`
|
|
|
57
57
|
is renamed where it is set, and the flags after `$GEN` where it runs. The word of a default
|
|
58
58
|
(`${GEN:-npx openapi-typescript}`, `${GEN:=…}`, `${GEN:+…}`) is read as a command line where it
|
|
59
59
|
is written, so the old name in it is renamed; the variable may hold another program set outside
|
|
60
|
-
the file, so the flags after such a default are reported. The
|
|
60
|
+
the file, so the flags after such a default are reported. The same holds for the string literals
|
|
61
|
+
of a GitHub Actions expression (`${{ inputs.gen || 'npx openapi-typescript' }}`), which the runner
|
|
62
|
+
puts into the script before the shell runs, and for the default of an input
|
|
63
|
+
(`inputs.command.default` of an `action.yml`, `workflow_call` and `workflow_dispatch` inputs):
|
|
64
|
+
the old name in them is renamed, and the flags after an expression are reported, because its value
|
|
65
|
+
comes from the run. A Makefile program that make computes (`$(or $(GEN),npx
|
|
66
|
+
openapi-typescript)`, `$(shell …)`) may run the generator too, so the flags after it are
|
|
67
|
+
reported. The flags change only when every definition of the variable
|
|
61
68
|
in the file sets it to the generator: a variable that another Dockerfile stage, a step `env` or a
|
|
62
69
|
later Makefile line or shell assignment sets to another program is reported with its old flags. So is a
|
|
63
70
|
variable that runs a command but that no definition the tool reads sets: one set by another
|
|
64
71
|
`script` item or step (`echo "GEN=…" >> "$GITHUB_ENV"`), a Makefile recipe's `$$GEN`, a bash
|
|
65
72
|
array (`GEN=(npx openapi-typescript)`, whose items are renamed, run as `"${GEN[@]}"`), or one
|
|
66
73
|
set outside the file. A variable of old
|
|
67
|
-
flags that the generator gets (`$(FLAGS)` with `FLAGS := -it
|
|
74
|
+
flags that the generator gets (`$(FLAGS)` with `FLAGS := -it`, or a justfile `{{flags}}` with
|
|
75
|
+
`flags := '-it'` or a recipe parameter `*flags='-it'`) may serve other commands too, so it
|
|
68
76
|
is reported, not changed. YAML files are changed only in command
|
|
69
|
-
keys (`run`, `script`, `command`, `entrypoint`, …)
|
|
70
|
-
style, never in other values. A CI step whose `shell` is another program (`shell: python`) runs
|
|
77
|
+
keys (`run`, `script`, `command`, `entrypoint`, …), in the values of `env` and in input
|
|
78
|
+
defaults, in block and flow style, never in other values. A CI step whose `shell` is another program (`shell: python`) runs
|
|
71
79
|
code of that language, so its script is not changed, and it is reported when it names an old
|
|
72
80
|
package. The nearest `shell` counts: the step's own, then the job's and the workflow's
|
|
73
|
-
`defaults.run.shell` (GitHub Actions), or the job's `shell`
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
`defaults.run.shell` (GitHub Actions), or the job's `shell` and then the `shell` of the
|
|
82
|
+
executor the job names (`executor: py`, CircleCI). `env` (`/usr/bin/env bash
|
|
83
|
+
-e {0}`) runs the program after it, and `msys2 {0}` and `wsl-bash {0}` run bash. The same holds for a
|
|
84
|
+
justfile recipe whose first line is a shebang for another program (`#!/usr/bin/env python3`), and
|
|
85
|
+
for code given on the command line (`python3 -c '…'`, `node -e "…"`, `ruby -e '…'`). An API description (a YAML document with a top-level `openapi`,
|
|
86
|
+
`swagger`, `asyncapi`, `overlay` or `arazzo` key whose value is a version, such as `openapi: 3.1.0`;
|
|
87
|
+
a CI config such as `.gitlab-ci.yml` or a workflow never is one, so a GitLab job named `openapi`
|
|
88
|
+
is migrated) is data, so it is never changed, not even an
|
|
76
89
|
example `command`, and neither is a YAML file that such a document (YAML or JSON) reaches by
|
|
77
90
|
`$ref`, directly or through other such files (a split layout's `components/schemas/Job.yaml`); a
|
|
78
91
|
YAML file that names no old package is not even parsed. A config that cannot be parsed and names an old package is reported with the
|
|
@@ -120,8 +133,9 @@ or written; the report lists it under "Skipped". A file is written as a new file
|
|
|
120
133
|
old one (same mode), so a hard link to a file elsewhere keeps its old text; the log notes it.
|
|
121
134
|
A file whose bytes are not UTF-8 (a Latin-1 source, for example) is not changed, because its
|
|
122
135
|
text cannot be written back without changing other characters; neither is a file that cannot be
|
|
123
|
-
read. The report lists both under "Skipped".
|
|
124
|
-
|
|
136
|
+
read. The report lists both under "Skipped". So does a file that a bug of the tool would corrupt
|
|
137
|
+
(two of its edits overlap): it is left as it was, the other files are still migrated, and the
|
|
138
|
+
command exits with `1`. Every file is read and migrated before the first one is written. If a write fails, the writing stops, the command exits with `1`, and the report names
|
|
125
139
|
the files written before it and the ones that were not.
|
|
126
140
|
The report and the log show a spec with credentials (`git+https://<token>@…`) as
|
|
127
141
|
`git+https://***@…`; the file keeps it as written.
|
|
@@ -145,8 +159,9 @@ The report lists each of these with the file and line:
|
|
|
145
159
|
code, so check whether the fix is still needed;
|
|
146
160
|
- a word in a command that names an old package where the tool cannot tell what runs it (an
|
|
147
161
|
argument of a program it does not know, a script name): migrate it by hand;
|
|
148
|
-
- a CI step whose `shell` is another program (`shell: python`)
|
|
149
|
-
|
|
162
|
+
- a CI step whose `shell` is another program (`shell: python`), a justfile recipe with a shebang
|
|
163
|
+
for one, or inline code (`python3 -c '…'`) that names an old package: the tool does not read
|
|
164
|
+
code of other languages, so migrate it by hand;
|
|
150
165
|
- an import map that a Deno config names by a URL or a path outside the folder;
|
|
151
166
|
- a renamed peer dependency: users of your package must switch too;
|
|
152
167
|
- a pnpm `package.json5` that names an old package: the tool does not read JSON5, so rename the
|
|
@@ -180,9 +195,14 @@ The report lists each of these with the file and line:
|
|
|
180
195
|
`overrides` or `resolutions` (see
|
|
181
196
|
[Libraries built on openapi-fetch](https://github.com/openapi-typesafe/openapi-typesafe/blob/main/docs/fetch/index.md#libraries-built-on-openapi-fetch));
|
|
182
197
|
- `transform` callbacks it cannot rewrite (also when their options use a type built from
|
|
183
|
-
`OpenAPITSOptions`, such as `Partial<OpenAPITSOptions
|
|
198
|
+
`OpenAPITSOptions`, such as `Partial<OpenAPITSOptions>`, or when the type declared for them
|
|
199
|
+
names another type, such as a local alias), and `postTransform` /
|
|
184
200
|
`transformProperty`, also in options that other code shares, and `openapiTS()` calls whose options it cannot see (a
|
|
185
|
-
parameter, a function call)
|
|
201
|
+
parameter, a function call). Options that take keys from another object (`{ ...base }`) are read
|
|
202
|
+
through it when the file writes it (`...{ … }` or a `const` with an object), so its callbacks are
|
|
203
|
+
reported and a `transform` in it is kept; a spread of anything else (an import, a call, a `let`)
|
|
204
|
+
is reported, since it may bring callbacks the tool cannot see. They keep working with a
|
|
205
|
+
deprecation warning; see
|
|
186
206
|
[IR callbacks](https://github.com/openapi-typesafe/openapi-typesafe/blob/main/docs/node.md#ir-callbacks).
|
|
187
207
|
|
|
188
208
|
Then install, regenerate your types and commit them once (the file header names openapi-typesafe
|
|
@@ -202,7 +222,8 @@ The default log folder is new for each run and only you can open it (mode 0700).
|
|
|
202
222
|
that exists gets the new lines appended, and missing parent folders are created.
|
|
203
223
|
|
|
204
224
|
Exit codes: `0` done, `1` the migration failed (the message and the log say why), a file could not
|
|
205
|
-
be written (the report names what was written), the
|
|
225
|
+
be written (the report names what was written), a bug of the tool left a file as it was (the report
|
|
226
|
+
lists it under "Skipped"), the project folder does not exist or is a file,
|
|
206
227
|
or the log could not be created (nothing is changed then), `2` unknown option or argument.
|
|
207
228
|
|
|
208
229
|
## Versioning
|