openapi-typesafe-migrate 1.0.0-rc.5 → 1.0.0-rc.7

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 CHANGED
@@ -1,5 +1,100 @@
1
1
  # openapi-typesafe-migrate
2
2
 
3
+ ## 1.0.0-rc.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - A CI script now runs with the shell that CI gives it: the step's own `shell`, then the job's and
8
+ the workflow's `defaults.run.shell` in GitHub Actions, or the job's `shell` in CircleCI. A Python
9
+ or Node script under such a default is left and reported instead of rewritten as shell, and
10
+ `shell: /usr/bin/env bash -e {0}`, `shell: msys2 {0}` and `shell: wsl-bash {0}` are read as bash
11
+ again, so their commands are migrated.
12
+
13
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - A rewritten `transform` in options of a `const` without a type (`const options = { transform }`)
14
+ now gets `irCallbacks: true as const` (in JavaScript, `/** @type {const} */ (true)`): a plain
15
+ `true` became `boolean` there, and the `openapiTS` call stopped compiling (TS2769). The option is
16
+ also written before the JSDoc of `transform`, which stays with `transform`.
17
+
18
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - An import that a JSDoc comment still names (`@param {ts.TypeNode} node`, `{@link ts.factory}`) is
19
+ no longer removed with the rewritten `transform` returns. In a checked JavaScript file the type
20
+ stopped resolving (TS2503).
21
+
22
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - A justfile variable set by an expression (`gen := env_var_or_default("GEN", "npx
23
+ openapi-typescript")`, an `if … { … } else { … }`), a recipe parameter default
24
+ (`types gen="npx openapi-typescript":`) and a string in an interpolation get the new generator
25
+ name again; they kept the old one without a word, and `npx` then downloaded the old generator.
26
+ Such a value can also be another program, so the old flags after `{{gen}}` are reported.
27
+
28
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - A local package under an old name in a workspace root (`"openapi-fetch": "file:./vendor/…"`) no
29
+ longer keeps the imports of a workspace package that declares the npm package itself. The
30
+ nearest manifest that declares the name decides, as Node resolves it: that package's dependency
31
+ and its imports now both get the new name.
32
+
33
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - The migration now renames the old generator inside a shell default value, such as
34
+ `${GEN:-npx openapi-typescript}`, `: "${GEN:=npx openapi-typescript}"` or
35
+ `npx ${PKG:-openapi-typescript}`. Before, these commands kept the old name and npx quietly ran the
36
+ old package. The variable can still be set to another program outside the file, so the flags after
37
+ such a default are listed as a manual step instead of being changed.
38
+
39
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - The files of a split API description (`components/schemas/Job.yaml`, reached by `$ref` from
40
+ `openapi.yaml` or `openapi.json`) and OpenAPI Overlay and Arazzo documents are data now, like the
41
+ API description itself: their example `command` and `script` values are no longer rewritten, so
42
+ the change no longer reaches the generated comments.
43
+
44
+ - [#101](https://github.com/openapi-typesafe/openapi-typesafe/pull/101) [`7b4ba3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7b4ba3f783c16e506d4c9afbfe6392b1e820b1e4) Thanks [@fedorello](https://github.com/fedorello)! - The migration now lists the old flags after a variable that runs a command when it cannot see
45
+ where the variable is set: in another GitLab `script` item, through `$GITHUB_ENV` in an earlier
46
+ step, as `$$GEN` in a Makefile recipe, as a bash array run with `"${GEN[@]}"`, or outside the
47
+ file. Before, flags like `-it` after such a variable were kept without a word, and the new
48
+ generator then stopped with an unknown flag. The items of a bash array are now renamed too.
49
+
50
+ ## 1.0.0-rc.6
51
+
52
+ ### Patch Changes
53
+
54
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - An OpenAPI, Swagger or AsyncAPI document in YAML is no longer changed: an example value under a
55
+ `command` or `script` key that mentions the generator stays as written.
56
+
57
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - `openapi-typesafe-migrate | head` (or any reader that closes the pipe early) no longer crashes with
58
+ an `EPIPE` stack trace and exit code 1: the rest of the report is dropped and the run ends as it
59
+ would have.
60
+
61
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - A constant or an import that an `export { … }` list names is no longer removed with the old
62
+ `transform` returns, so the file still compiles.
63
+
64
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - An exported function that `transform` names is no longer rewritten: other modules may call it
65
+ and expect TypeScript nodes. It is kept and reported as a manual step, like options that other
66
+ code uses.
67
+
68
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - A justfile variable that holds the generator (`gen := "npx openapi-typescript"`) now has its old
69
+ flags renamed where it runs: `{{gen}} api.yaml -it` kept `-it`. A variable of old flags that the
70
+ generator gets (`{{flags}}`) is reported.
71
+
72
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - A dependency under an old name on a local package (`workspace:*`, `link:`, `file:`, `portal:`),
73
+ such as a fork named `openapi-fetch` in the workspace, is no longer renamed: the new name pointed
74
+ at a package the workspace does not have, and the install failed. The dependency and the imports
75
+ of it keep their name, and the report lists it as a manual step.
76
+
77
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - A CI step whose `shell` is another program (`shell: python` in GitHub Actions, or a CircleCI
78
+ `shell` next to `command`) runs code of that language, not commands. Its script is now left as it
79
+ is and reported when it names an old package; it was skipped without a word.
80
+
81
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - A shell variable that holds the generator is migrated now. A script, a CI `run` block or a
82
+ `package.json` script that sets `GEN="npx openapi-typescript"` (also after `export`, `local` or
83
+ `readonly`) and then runs `$GEN api.yaml -it` was left as it was, and nothing was reported, so
84
+ the build went on downloading the old generator. The value is renamed where it is set and the
85
+ flags after `$GEN` where it runs, and a variable of old flags that the generator gets is reported.
86
+
87
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - Once `openapi-fetch` is aliased to `openapi-typesafe-fetch` in the overrides (as the docs ask for
88
+ swr-openapi), the report no longer says to update that override or to add the alias again, so a
89
+ second run is clean. The alias counts in the `package.json` itself and in a workspace above it.
90
+
91
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - A path in the `typesVersions` of `package.json` into the installed files of an old package
92
+ (`node_modules/openapi-fetch/dist/index.d.ts`) is reported, as such paths in a tsconfig are: the
93
+ new package has its own files there.
94
+
95
+ - [#93](https://github.com/openapi-typesafe/openapi-typesafe/pull/93) [`25f631d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/25f631d8dabed24e18a859b08e8395496e145118) Thanks [@fedorello](https://github.com/fedorello)! - The `command` of a wireit script in `package.json` is migrated like the other scripts. It was
96
+ neither changed nor reported.
97
+
3
98
  ## 1.0.0-rc.5
4
99
 
5
100
  ### Patch Changes
package/README.md CHANGED
@@ -18,23 +18,23 @@ 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:` and `workspace:` stay. 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. Module constants and imports that only the old returns used are removed. 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. |
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
34
34
  `nx.json` target defaults (also their `configurations`), `deno.json` tasks, pnpm `package.yaml`
35
35
  scripts, Task's `Taskfile.yml` (`cmds`, `cmd`, `sh`, `status`, `defer`, `preconditions`),
36
- pre-commit hooks (`entry` with its `args`), and the `simple-git-hooks`, `lint-staged` and
37
- `nx.targets` commands of a manifest, also in `.lintstagedrc*` and `.simple-git-hooks.json`. The
36
+ pre-commit hooks (`entry` with its `args`), and the `simple-git-hooks`, `lint-staged`,
37
+ `nx.targets` and wireit `command` commands of a manifest, also in `.lintstagedrc*` and `.simple-git-hooks.json`. The
38
38
  generator is found behind the usual wrappers too (`npx`, `pnpm exec`, `yarn workspace <name>`,
39
39
  `dotenvx run`, `nx exec`, `tsx`, `timeout`, `xargs`, …). A here-document is data, except the one a
40
40
  shell runs (`bash <<EOF`, `cat <<EOF | sh`). They are read word by word, the way the shell splits
@@ -47,14 +47,35 @@ Dockerfile's exec form (`RUN ["npx",
47
47
  openapi-typescript`, also for some targets only, and `GEN := $(OAT)`) is renamed where it is set,
48
48
  and the flags after `$(OAT)` (or `$G` for a one-letter name) where it runs; so is an `env` variable
49
49
  of a workflow and the flags after `$GEN` or `${{ env.GEN }}`, and a Dockerfile `ARG` or `ENV`
50
- variable and the flags after `$GEN`. The flags change only when every definition of the variable
50
+ variable and the flags after `$GEN`, and a justfile variable (`gen := "npx openapi-typescript"`)
51
+ and the flags after `{{gen}}`. In a justfile every string and backtick of an expression is read
52
+ as a command line where it is written: in a value that just computes
53
+ (`env_var_or_default("GEN", "npx openapi-typescript")`, an `if`), in a recipe parameter default
54
+ (`types gen="npx openapi-typescript":`) and in an interpolation; such a value and a parameter (the
55
+ command line can set it) may run another program, so the flags after them are reported. A shell variable that a script, a `run` block or a package.json
56
+ script sets itself (`GEN="npx openapi-typescript"`, also after `export`, `local` or `readonly`)
57
+ is renamed where it is set, and the flags after `$GEN` where it runs. The word of a default
58
+ (`${GEN:-npx openapi-typescript}`, `${GEN:=…}`, `${GEN:+…}`) is read as a command line where it
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 flags change only when every definition of the variable
51
61
  in the file sets it to the generator: a variable that another Dockerfile stage, a step `env` or a
52
- later Makefile line sets to another program is reported with its old flags. A variable of old
62
+ later Makefile line or shell assignment sets to another program is reported with its old flags. So is a
63
+ variable that runs a command but that no definition the tool reads sets: one set by another
64
+ `script` item or step (`echo "GEN=…" >> "$GITHUB_ENV"`), a Makefile recipe's `$$GEN`, a bash
65
+ array (`GEN=(npx openapi-typescript)`, whose items are renamed, run as `"${GEN[@]}"`), or one
66
+ set outside the file. A variable of old
53
67
  flags that the generator gets (`$(FLAGS)` with `FLAGS := -it`) may serve other commands too, so it
54
68
  is reported, not changed. YAML files are changed only in command
55
69
  keys (`run`, `script`, `command`, `entrypoint`, …) and in the values of `env`, in block and flow
56
- style, never in other values such as an OpenAPI `description`; a YAML file that names no old package
57
- is not even parsed. A config that cannot be parsed and names an old package is reported with the
70
+ style, never in other values. A CI step whose `shell` is another program (`shell: python`) runs
71
+ code of that language, so its script is not changed, and it is reported when it names an old
72
+ 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` (CircleCI). `env` (`/usr/bin/env bash
74
+ -e {0}`) runs the program after it, and `msys2 {0}` and `wsl-bash {0}` run bash. An API description (a YAML document with a top-level `openapi`,
75
+ `swagger`, `asyncapi`, `overlay` or `arazzo` key) is data, so it is never changed, not even an
76
+ example `command`, and neither is a YAML file that such a document (YAML or JSON) reaches by
77
+ `$ref`, directly or through other such files (a split layout's `components/schemas/Job.yaml`); a
78
+ 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
58
79
  line and column, not changed. `Makefile`, `justfile` and `Dockerfile` are read only under the names
59
80
  make, just and docker look for (also `makefile`, `GNUmakefile`, `Justfile`, `.justfile`,
60
81
  `Containerfile` and `*.mk`), so `Dockerfile.dev` is not changed.
@@ -112,7 +133,11 @@ The report lists each of these with the file and line:
112
133
  - a version spec it cannot replace (`latest`, a URL, a file, an npm alias), and `overrides` /
113
134
  `resolutions` and every other package manager setting (`packageExtensions`,
114
135
  `allowedDeprecatedVersions`, …, in `package.json`, `pnpm-workspace.yaml` or `.yarnrc.yml`,
115
- patches included) that names an old package;
136
+ patches included) that names an old package, except an override that aliases it to its
137
+ successor (`"openapi-fetch": "npm:openapi-typesafe-fetch@^1.0.0"`), which is the migration done;
138
+ - a dependency under an old name on a local package (`workspace:*`, `link:`, `file:`, `portal:`),
139
+ such as a fork in the workspace: it and the imports of it keep the old name, because the new
140
+ name would point at a package the project does not have;
116
141
  - a `catalog:` dependency whose catalog entry is outside the folder it migrates (`--root` of one
117
142
  package of a workspace), or missing from the workspace: it keeps its old name, because the
118
143
  entry is not edited;
@@ -120,6 +145,8 @@ The report lists each of these with the file and line:
120
145
  code, so check whether the fix is still needed;
121
146
  - a word in a command that names an old package where the tool cannot tell what runs it (an
122
147
  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`) and whose script names an old
149
+ package: the tool does not read code of other languages, so migrate it by hand;
123
150
  - an import map that a Deno config names by a URL or a path outside the folder;
124
151
  - a renamed peer dependency: users of your package must switch too;
125
152
  - a pnpm `package.json5` that names an old package: the tool does not read JSON5, so rename the
@@ -134,8 +161,8 @@ The report lists each of these with the file and line:
134
161
  - deep imports such as `openapi-fetch/dist/...` (also subpath import targets and `browser` keys):
135
162
  check that the file exists in the new package;
136
163
  - imports from the `node_modules` folder of an old package (`../node_modules/openapi-fetch/x.js`),
137
- and such paths in a tsconfig: import from the new package instead, or point the path at its
138
- files;
164
+ and such paths in a tsconfig or in `typesVersions`: import from the new package instead, or
165
+ point the path at its files;
139
166
  - Jest patterns that name an old package (`moduleNameMapper`, `transformIgnorePatterns`): make
140
167
  them match the new name where they mean the package;
141
168
  - a module name built at run time right after an old package name
@@ -148,9 +175,9 @@ The report lists each of these with the file and line:
148
175
  - strings that equal an old package name outside a module specifier (an object key, a label, a
149
176
  bundler option such as `external: ["openapi-fetch"]`): they are kept, because only you know
150
177
  whether they mean the package. Comments are not changed or reported;
151
- - `swr-openapi` in your dependencies: it takes its client type from `openapi-fetch` (a peer
152
- dependency), so alias `openapi-fetch` to `openapi-typesafe-fetch` with `overrides` or
153
- `resolutions` (see
178
+ - `swr-openapi` in your dependencies, until the alias is in place: it takes its client type from
179
+ `openapi-fetch` (a peer dependency), so alias `openapi-fetch` to `openapi-typesafe-fetch` with
180
+ `overrides` or `resolutions` (see
154
181
  [Libraries built on openapi-fetch](https://github.com/openapi-typesafe/openapi-typesafe/blob/main/docs/fetch/index.md#libraries-built-on-openapi-fetch));
155
182
  - `transform` callbacks it cannot rewrite (also when their options use a type built from
156
183
  `OpenAPITSOptions`, such as `Partial<OpenAPITSOptions>`), and `postTransform` /