Commit 15cefb0
committed
refactor: bring back json imports (#1176)
## 🧰 Changes
[node v20.18.3](https://nodejs.org/en/blog/release/v20.18.3) officially
marked import attributes [as
stable](https://nodejs.org/docs/latest-v20.x/api/esm.html#import-attributes).
we have a lot of weird workarounds with our `oclif` setup in this repo
in an effort to avoid import attributes and the ugly
`ExperimentalWarning` outputs we see, but i don't think those should be
a concern anymore, for a few reasons:
- our minimum required node.js version is node 20, so it should be a
non-disruptive change for users to upgrade to the latest node 20 channel
- even if folks are on <20.18.2, the `ExperimentalWarning` outputs log
to `stderr` so it shouldn't affect any command output-based workflows,
which almost always are relying on `stdout`. plus, we discourage this
kind of scripting and recommend folks use exit codes instead
given the above, this PR brings back JSON imports of `package.json` and
vastly simplifies a lot of weirdness in this codebase.
## 🧬 QA & Testing
we've added a lot of good test coverage now and i've been playing around
with the CLI and github actions build locally and everything seems to
work as expected.
very unlikely we'll run into the fiasco in
#1117, especially now with the
cleanups in this PR and #1172.1 parent d1c9dfb commit 15cefb0
File tree
7 files changed
+6
-24
lines changed- bin
- src/lib
7 files changed
+6
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 5 | | |
12 | 6 | | |
13 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 16 | | |
26 | 17 | | |
27 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
0 commit comments