openapi-typesafe-migrate 1.0.0-rc.11 → 1.0.0-rc.12

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,51 @@
1
1
  # openapi-typesafe-migrate
2
2
 
3
+ ## 1.0.0-rc.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - In a shell script that appends to a variable twice (`H+="npx openapi-typescript"`, then
8
+ `H+=" -it"`), the appended old flag is now reported. Before, the name was renamed and `-it` was
9
+ kept without a word, so `$H api.yaml` failed.
10
+
11
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - A Compose `entrypoint` or `command` that a merge key gives (`<<: *gen`) is paired with the
12
+ service's own keys, so the old flags of `command: ["api.yaml", "-it"]` after a merged generator
13
+ entrypoint are renamed. The service's own keys win over merged ones, and the first map of a
14
+ merge list wins over later ones. Before, the entrypoint was renamed and `-it` was kept.
15
+
16
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - The `args` of a GitHub Docker action (`runs.entrypoint` with `runs.args`) and of a `docker://`
17
+ step (`with.entrypoint` with `with.args`) are read as the arguments of the entrypoint, so the
18
+ old flags there are renamed. Before, they were kept and not reported.
19
+
20
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - Dockerfile `ENV` and `ARG` values are read as Docker reads them: escaped blanks
21
+ (`ENV GEN=node_modules/.bin/openapi-typescript\ --redoc\ r.yaml`), several quoted parts
22
+ (`ARG G2="npx "openapi-typescript`), escaped quotes, continued lines and the escape character
23
+ that `# escape=` sets. The generator command in them is migrated, and the old flags after
24
+ `$GEN` are renamed. Before, these values were neither changed nor reported.
25
+
26
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - A file that a Taskfile includes or an Azure Pipelines template now reports the old flags after
27
+ `{{.GEN}}` or `$(gen)` when the including file sets that variable to the generator. Before, only
28
+ `$GEN` was reported there and the other forms kept their flags silently.
29
+
30
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - A container command that runs the generator after an init program or an entrypoint script
31
+ (`entrypoint: ["tini", "--"]`, `["dumb-init", "--"]`, `["docker-entrypoint.sh"]`, a Dockerfile
32
+ `ENTRYPOINT ["/sbin/tini", "--"]`, a Kubernetes `command` with `args`) is migrated again: the
33
+ generator name and its old flags are renamed. Before, it was only reported as a name the tool
34
+ could not place. `tini`, `docker-init`, `dumb-init`, `catatonit`, `gosu` and `su-exec` are now
35
+ known wrappers in every command, also by their full path.
36
+
37
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - A Makefile argument written with `:=`, `::=`, `:::=`, `?=`, `!=` or `+=`
38
+ (`$(MAKE) -C api GEN:="npx openapi-typescript -it"`) is read as the variable it sets, as
39
+ `GEN="…"` already was, so its command is migrated.
40
+
41
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - The script of `sh -c` is read as the shell reads it however it is quoted
42
+ (`sh -c 'npx openapi-typescript '"'"'a.yaml'"'"' -it'`, `sh -c "X='…'; \$X b.yaml -it"`), so
43
+ the generator and its old flags are renamed. A flag in quotes (`"-it"`) is renamed too. A flag
44
+ that quotes split (`-i't'`) is reported with its new name instead of kept silently.
45
+
46
+ - [#142](https://github.com/openapi-typesafe/openapi-typesafe/pull/142) [`61181e9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/61181e9ec62191cb119d1ba4f8348fd1f4fbb0ea) Thanks [@fedorello](https://github.com/fedorello)! - `openapiTS(spec, undefined)` and `openapiTS(spec, void 0)` are read as a call without options.
47
+ Before, the report asked to check the options by hand.
48
+
3
49
  ## 1.0.0-rc.11
4
50
 
5
51
  ### Patch Changes
package/README.md CHANGED
@@ -53,6 +53,10 @@ the same map (Compose, GitLab, CircleCI) and Kubernetes `args` after a `command`
53
53
  same way; when both are lists, they are one exec-form command, the entrypoint first
54
54
  (`entrypoint: ["npx"]` with `command: ["openapi-typescript", "-it"]`, or `command: ["/bin/sh",
55
55
  "-c"]` with its script in `args`), and Compose's `$$GEN` there is the container's `$GEN`. A
56
+ GitHub Docker action's `args` after its `entrypoint` are read the same way, and so are keys that
57
+ a merge key (`<<: *gen`) gives. After an init program or an entrypoint script that runs its
58
+ command (`["tini", "--"]`, `["dumb-init", "--"]`, `["docker-entrypoint.sh"]`), a command that
59
+ runs the generator itself is migrated as its own command. A
56
60
  Makefile variable that holds the generator (`OAT :=
57
61
  openapi-typescript`, also for some targets only, and `GEN := $(OAT)`) is renamed where it is set,
58
62
  and the flags after `$(OAT)` (or `$G` for a one-letter name) where it runs; so is an `env` variable
@@ -69,9 +73,11 @@ as a command line where it is written: in a value that just computes
69
73
  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
70
74
  script sets itself (`GEN="npx openapi-typescript"`, also after `export`, `local` or `readonly`,
71
75
  and written with a backslash or in several quoted parts, `GEN=npx\ openapi-typescript`, which
72
- is read as the shell reads it) is renamed where it is set, and the flags after `$GEN` where it
76
+ is read as the shell reads it; the same holds for a Dockerfile `ENV` value with Docker's escape
77
+ character and for the script of `sh -c` however it is quoted; a flag in quotes, `"-it"`, is
78
+ renamed, and a name or flag that quotes split, `-i't'`, is reported) is renamed where it is set, and the flags after `$GEN` where it
73
79
  runs. A command line passed to a program as a variable (`cross-env GEN="npx openapi-typescript
74
- -it" node gen.js`, `env GEN="…" make`, `$(MAKE) GEN="…"`) is migrated where it is written. Text
80
+ -it" node gen.js`, `env GEN="…" make`, `$(MAKE) GEN="…"` or `GEN:="…"`) is migrated where it is written. Text
75
81
  appended to a variable the file does not set before is the value when it runs the generator
76
82
  itself (`H+="npx openapi-typescript"`, a Makefile `GEN += npx openapi-typescript`), so it is
77
83
  migrated where it is written. Text appended to such a