modern-cmdk 1.4.0 → 1.5.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/README.md +31 -27
- package/THIRD-PARTY-NOTICES.md +303 -0
- package/dist/codemod/bin.mjs +14 -0
- package/dist/codemod/chunk-jscodeshift.mjs +36210 -0
- package/dist/codemod/chunk-print-options.mjs +43 -0
- package/dist/codemod/chunk-worker.mjs +476 -0
- package/dist/codemod/cli.mjs +297 -43660
- package/dist/codemod/transforms/data-attrs.mjs +551 -38
- package/dist/codemod/transforms/forward-ref.mjs +197 -32
- package/dist/codemod/transforms/import-rewrite.mjs +389 -30
- package/dist/codemod/transforms/should-filter.mjs +199 -10
- package/dist/codemod/worker.mjs +1 -0
- package/dist/core/index.d.mts +6 -1
- package/dist/core/index.mjs +12 -4
- package/dist/react/dialog.mjs +0 -1
- package/dist/react/index.d.mts +21 -3
- package/dist/react/index.mjs +45 -16
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ npm install modern-cmdk react react-dom
|
|
|
55
55
|
|
|
56
56
|
`Command.Dialog` stays on the `modern-cmdk/react` barrel through 1.x and leaves it in 2.0; `modern-cmdk/react/dialog` exports `CommandDialog` alone.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
`modern-cmdk-codemod` and `create-modern-cmdk` support Node >=26.4.0 and declare it in `engines`; the deprecated `modern-cmdk` bin is supported on it too. `modern-cmdk` itself declares no `engines`.
|
|
59
59
|
|
|
60
60
|
`sideEffects` lists only `./dist/react/styles.css`; every JavaScript entry is side-effect-free for bundlers.
|
|
61
61
|
|
|
@@ -153,47 +153,50 @@ Theming (CSS custom properties, `@layer command`) is covered in the [theming gui
|
|
|
153
153
|
|
|
154
154
|
## Sizes
|
|
155
155
|
|
|
156
|
-
Figures come from [`benchmarks/size-history/1.
|
|
156
|
+
Figures come from [`benchmarks/size-history/1.5.0.json`](https://github.com/ABCrimson/modern-cmdk/blob/4498a0f/benchmarks/size-history/1.5.0.json) (committed in `4498a0f`, measured at `d5ce6ff` on 2026-11-07 with size-limit 14.3.0 and `npm pack --dry-run --json`). Method: size-limit, gzip, peers (`react`, `react-dom`, `radix-ui`) ignored; the codemod entries are raw installed size of the files named.
|
|
157
157
|
|
|
158
|
-
| Entry | Bytes | Method |
|
|
159
|
-
|
|
160
|
-
| `modern-cmdk` (core) |
|
|
161
|
-
| `modern-cmdk/react`, adapter only |
|
|
162
|
-
| `modern-cmdk` + `modern-cmdk/react` |
|
|
163
|
-
| `modern-cmdk/react/dialog`, adapter only |
|
|
164
|
-
| `modern-cmdk/react`, `CommandSeparator` only |
|
|
165
|
-
| `modern-cmdk/styles.css` | 3959 | gzip |
|
|
166
|
-
| codemod bin (`dist/codemod
|
|
158
|
+
| Entry | Bytes | Limit | Method |
|
|
159
|
+
|---|---|---|---|
|
|
160
|
+
| `modern-cmdk` (core) | 6399 | 6500 | gzip |
|
|
161
|
+
| `modern-cmdk/react`, adapter only | 5539 | 5600 | gzip, `modern-cmdk` ignored |
|
|
162
|
+
| `modern-cmdk` + `modern-cmdk/react` | 10003 | 10100 | gzip, core included |
|
|
163
|
+
| `modern-cmdk/react/dialog`, adapter only | 1422 | 1500 | gzip, `modern-cmdk` ignored |
|
|
164
|
+
| `modern-cmdk/react`, `CommandSeparator` only | 4812 | 5000 | gzip, `modern-cmdk` ignored; still contains `CommandDialog`, `CommandRoot` and the `radix-ui` import (tree-shaking of the barrel is a 2.0 item) |
|
|
165
|
+
| `modern-cmdk/styles.css` | 3959 | 4000 | gzip |
|
|
166
|
+
| codemod bin (`dist/codemod/*.mjs` plus `dist/codemod/transforms/*.mjs`) | 3150372 | 3400000 | raw installed size, not gzip |
|
|
167
|
+
| codemod shim (`dist/codemod/bin.mjs`) | 897 | 1000 | raw installed size, not gzip |
|
|
167
168
|
|
|
168
|
-
|
|
169
|
+
The packed `modern-cmdk` tarball: 1.4 (built from `release/1.4.0` at `b77f133` and measured on 2026-11-05; not on npm) is 992157 B packed and 3473079 B unpacked in 16 entries, of which 147286 B is runtime and 3325793 B is the codemod; the 1.5 release candidate is 962822 B packed and 3315632 B unpacked in 22 entries, of which 165260 B is runtime (152384 B without `THIRD-PARTY-NOTICES.md`, which is 12876 B) and 3150372 B is the codemod, including the 897 B shim. The codemod's own package, `modern-cmdk-codemod`, is 33119 B packed and 113416 B unpacked in 11 entries; `jscodeshift` is not in that tarball.
|
|
169
170
|
|
|
170
171
|
## Migration from cmdk
|
|
171
172
|
|
|
172
|
-
|
|
173
|
+
The codemods live in their own package, [`modern-cmdk-codemod`](https://github.com/ABCrimson/modern-cmdk/tree/main/packages/modern-cmdk-codemod) (Node >= 26.4.0; see its README for every option and exit code). Pass a transform name and a directory or a glob (quote the glob so your shell does not expand it). A real run needs a git work tree with the matched files committed, or `--force`; a dry run needs neither:
|
|
173
174
|
|
|
174
175
|
```bash
|
|
175
|
-
npx modern-cmdk --help
|
|
176
|
-
npx modern-cmdk import-rewrite
|
|
177
|
-
|
|
176
|
+
npx modern-cmdk-codemod --help
|
|
177
|
+
npx modern-cmdk-codemod --dry-run import-rewrite ./src
|
|
178
|
+
git status --short # empty: everything committed
|
|
179
|
+
npx modern-cmdk-codemod import-rewrite ./src
|
|
178
180
|
```
|
|
179
181
|
|
|
182
|
+
Run all four in this order, committing after each: `should-filter`, `forward-ref`, `data-attrs`, `import-rewrite`.
|
|
183
|
+
|
|
180
184
|
| Transform | What it does |
|
|
181
185
|
|---|---|
|
|
182
|
-
| `import-rewrite` | Rewrites `cmdk`
|
|
183
|
-
| `data-attrs` |
|
|
184
|
-
| `forward-ref` |
|
|
185
|
-
| `should-filter` | Converts the `shouldFilter` prop to `filter` |
|
|
186
|
+
| `import-rewrite` | Rewrites imports, re-exports, `import()`, `require()` and `vi.mock` or `jest.mock` of `'cmdk'` to `'modern-cmdk/react'`; reports the names and subpaths `modern-cmdk/react` lacks |
|
|
187
|
+
| `data-attrs` | Renames `cmdk-*` attributes to `data-command-*` and `--cmdk-list-height` to `--command-list-height` in JSX, in selectors inside JS/TS strings and in `.css` and `.scss` files; rewrites cmdk's state attributes beside them (`[data-selected="true"]` becomes `[data-active]`, `[data-disabled="true"]` becomes `[data-disabled]`) and the Tailwind variants on cmdk elements; reports what has no equivalent (`cmdk-label`, `cmdk-item-select`) or cannot be migrated automatically |
|
|
188
|
+
| `forward-ref` | Unwraps `forwardRef` from `react` into a function component that takes `ref` as a prop (React 19) |
|
|
189
|
+
| `should-filter` | Converts the `shouldFilter` prop to `filter` and wraps a cmdk `filter` function in an adapter to the `(item, query)` signature |
|
|
186
190
|
|
|
187
|
-
|
|
191
|
+
Every site a transform cannot migrate is printed as `<path>: <message>` on stderr and left unchanged. Exit codes of `modern-cmdk-codemod`: `0` success (reports included), `1` a file errored or no file matched, `2` a usage error or a refused dirty tree.
|
|
188
192
|
|
|
189
|
-
|
|
193
|
+
### The deprecated `modern-cmdk` bin
|
|
190
194
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
+
`modern-cmdk` still ships the old `modern-cmdk` bin until 2.0, as a shim (`dist/codemod/bin.mjs`) over the same four transforms. It is deprecated: it writes one deprecation warning to stderr per run and points to `modern-cmdk-codemod`. It keeps the 1.x behaviour: lenient exit codes unless argv carries `--strict` (without `--strict`, `0` for `--help`, missing arguments, usage errors and per-file errors; `1` for an unknown transform, no matching files and an uncaught error), 1.4's excludes (of the ten directories `modern-cmdk-codemod` skips, it skips only `node_modules`, `dist`, `build` and `.next`, and applies no `.gitignore`; like `modern-cmdk-codemod`, it reads only the ten script and stylesheet extensions from a directory, leaves out files and directories whose names start with a dot unless a pattern segment starts with that dot or a directory argument names that directory, descends no symlinked directory under `**` or a directory argument, reads no symlinked file and on Windows matches names case-insensitively; unlike it, it follows a symlinked directory that a pattern names or that a directory argument names, such as `"./src/link/*.tsx"` or `./src/link`), and no git check. The bin leaves in 2.0.
|
|
196
|
+
|
|
197
|
+
### Third-party notices
|
|
195
198
|
|
|
196
|
-
|
|
199
|
+
The ten packages bundled into `dist/codemod` are listed with their licences in `THIRD-PARTY-NOTICES.md`, which ships in the `modern-cmdk` tarball. It is generated by `scripts/third-party-notices.ts` and checked by `pnpm check:notices`.
|
|
197
200
|
|
|
198
201
|
See the [full migration guide](https://abcrimson.github.io/modern-cmdk/guide/migration-from-cmdk.html).
|
|
199
202
|
|
|
@@ -209,6 +212,7 @@ See the [full migration guide](https://abcrimson.github.io/modern-cmdk/guide/mig
|
|
|
209
212
|
|
|
210
213
|
| Package | Status |
|
|
211
214
|
|---|---|
|
|
215
|
+
| [`modern-cmdk-codemod`](https://github.com/ABCrimson/modern-cmdk/tree/main/packages/modern-cmdk-codemod) | The cmdk migration codemods as their own package from 1.5 (`npx modern-cmdk-codemod <transform> <dir or glob>`), strict by default. |
|
|
212
216
|
| [`create-modern-cmdk`](https://www.npmjs.com/package/create-modern-cmdk) | Published. `npm create modern-cmdk@latest <name>` scaffolds a new project. |
|
|
213
217
|
| `modern-cmdk-search-wasm` | Experimental Rust/WASM fuzzy search; private (0.9.0), not on npm. |
|
|
214
218
|
| `vscode-modern-cmdk` | Not on the VS Code Marketplace. The npm 1.0.0 of that name was an accidental publish and is not the extension; the package is private from 1.4.0. |
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
<!-- Generated by `node scripts/third-party-notices.ts`; do not edit. `--check` fails when this file is stale. -->
|
|
4
|
+
|
|
5
|
+
This file covers `dist/codemod` only. The deprecated `modern-cmdk` bin (`dist/codemod/bin.mjs`) bundles the code below, inlined by tsdown from the codemod package and jscodeshift with its parser tree, and it redistributes that code under the licences reproduced here. The bundle leaves `modern-cmdk` in 2.0, and so does this file.
|
|
6
|
+
|
|
7
|
+
The `modern-cmdk-codemod` package bundles nothing: it declares jscodeshift as a dependency, so it needs no notices file.
|
|
8
|
+
|
|
9
|
+
The rest of `modern-cmdk` (`dist/core`, `dist/react`) inlines no third-party code.
|
|
10
|
+
|
|
11
|
+
## @babel/parser@7.29.12
|
|
12
|
+
|
|
13
|
+
Licence: MIT
|
|
14
|
+
|
|
15
|
+
File: `LICENSE`
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
Copyright (C) 2012-2014 by various contributors (see AUTHORS)
|
|
19
|
+
|
|
20
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
22
|
+
in the Software without restriction, including without limitation the rights
|
|
23
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
25
|
+
furnished to do so, subject to the following conditions:
|
|
26
|
+
|
|
27
|
+
The above copyright notice and this permission notice shall be included in
|
|
28
|
+
all copies or substantial portions of the Software.
|
|
29
|
+
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
36
|
+
THE SOFTWARE.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## ast-types@0.16.3
|
|
40
|
+
|
|
41
|
+
Licence: MIT
|
|
42
|
+
|
|
43
|
+
File: `LICENSE`
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
Copyright (c) 2013 Ben Newman <bn@cs.stanford.edu>
|
|
47
|
+
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of this software and associated documentation files (the
|
|
50
|
+
"Software"), to deal in the Software without restriction, including
|
|
51
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
52
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
53
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
54
|
+
the following conditions:
|
|
55
|
+
|
|
56
|
+
The above copyright notice and this permission notice shall be
|
|
57
|
+
included in all copies or substantial portions of the Software.
|
|
58
|
+
|
|
59
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
60
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
61
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
62
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
63
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
64
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
65
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## esprima@4.0.1
|
|
69
|
+
|
|
70
|
+
Licence: BSD-2-Clause
|
|
71
|
+
|
|
72
|
+
File: `LICENSE.BSD`
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
Copyright JS Foundation and other contributors, https://js.foundation/
|
|
76
|
+
|
|
77
|
+
Redistribution and use in source and binary forms, with or without
|
|
78
|
+
modification, are permitted provided that the following conditions are met:
|
|
79
|
+
|
|
80
|
+
* Redistributions of source code must retain the above copyright
|
|
81
|
+
notice, this list of conditions and the following disclaimer.
|
|
82
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
83
|
+
notice, this list of conditions and the following disclaimer in the
|
|
84
|
+
documentation and/or other materials provided with the distribution.
|
|
85
|
+
|
|
86
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
87
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
88
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
89
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
|
90
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
91
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
92
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
93
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
94
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
95
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## flow-estree@0.337.0
|
|
99
|
+
|
|
100
|
+
Licence: MIT
|
|
101
|
+
|
|
102
|
+
Licence text pinned in this repository, from https://github.com/facebook/flow/blob/741104e69c43057ebd32804dd6bcc1b5e97548ea/LICENSE, fetched 2026-11-05, because the npm tarball ships no licence file; package.json declares MIT and the flow repository.
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
MIT License
|
|
106
|
+
|
|
107
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
108
|
+
|
|
109
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
110
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
111
|
+
in the Software without restriction, including without limitation the rights
|
|
112
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
113
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
114
|
+
furnished to do so, subject to the following conditions:
|
|
115
|
+
|
|
116
|
+
The above copyright notice and this permission notice shall be included in all
|
|
117
|
+
copies or substantial portions of the Software.
|
|
118
|
+
|
|
119
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
120
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
121
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
122
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
123
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
124
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
125
|
+
SOFTWARE.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## flow-parser@0.337.0
|
|
129
|
+
|
|
130
|
+
Licence: MIT
|
|
131
|
+
|
|
132
|
+
Licence text pinned in this repository, from https://github.com/facebook/flow/blob/741104e69c43057ebd32804dd6bcc1b5e97548ea/LICENSE, fetched 2026-11-05, because the npm tarball ships no licence file; package.json declares MIT and the flow repository.
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
MIT License
|
|
136
|
+
|
|
137
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
138
|
+
|
|
139
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
140
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
141
|
+
in the Software without restriction, including without limitation the rights
|
|
142
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
143
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
144
|
+
furnished to do so, subject to the following conditions:
|
|
145
|
+
|
|
146
|
+
The above copyright notice and this permission notice shall be included in all
|
|
147
|
+
copies or substantial portions of the Software.
|
|
148
|
+
|
|
149
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
150
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
151
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
152
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
153
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
154
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
155
|
+
SOFTWARE.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## jscodeshift@17.4.0
|
|
159
|
+
|
|
160
|
+
Licence: MIT
|
|
161
|
+
|
|
162
|
+
File: `LICENSE`
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
MIT License
|
|
166
|
+
|
|
167
|
+
Copyright (c) Facebook, Inc. and its affiliates.
|
|
168
|
+
|
|
169
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
170
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
171
|
+
in the Software without restriction, including without limitation the rights
|
|
172
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
173
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
174
|
+
furnished to do so, subject to the following conditions:
|
|
175
|
+
|
|
176
|
+
The above copyright notice and this permission notice shall be included in all
|
|
177
|
+
copies or substantial portions of the Software.
|
|
178
|
+
|
|
179
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
180
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
181
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
182
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
183
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
184
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
185
|
+
SOFTWARE.
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## recast@0.23.21
|
|
189
|
+
|
|
190
|
+
Licence: MIT
|
|
191
|
+
|
|
192
|
+
File: `LICENSE`
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
Copyright (c) 2012 Ben Newman <bn@cs.stanford.edu>
|
|
196
|
+
|
|
197
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
198
|
+
a copy of this software and associated documentation files (the
|
|
199
|
+
"Software"), to deal in the Software without restriction, including
|
|
200
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
201
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
202
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
203
|
+
the following conditions:
|
|
204
|
+
|
|
205
|
+
The above copyright notice and this permission notice shall be
|
|
206
|
+
included in all copies or substantial portions of the Software.
|
|
207
|
+
|
|
208
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
209
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
210
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
211
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
212
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
213
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
214
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## source-map@0.6.1
|
|
218
|
+
|
|
219
|
+
Licence: BSD-3-Clause
|
|
220
|
+
|
|
221
|
+
File: `LICENSE`
|
|
222
|
+
|
|
223
|
+
```text
|
|
224
|
+
|
|
225
|
+
Copyright (c) 2009-2011, Mozilla Foundation and contributors
|
|
226
|
+
All rights reserved.
|
|
227
|
+
|
|
228
|
+
Redistribution and use in source and binary forms, with or without
|
|
229
|
+
modification, are permitted provided that the following conditions are met:
|
|
230
|
+
|
|
231
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
232
|
+
list of conditions and the following disclaimer.
|
|
233
|
+
|
|
234
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
235
|
+
this list of conditions and the following disclaimer in the documentation
|
|
236
|
+
and/or other materials provided with the distribution.
|
|
237
|
+
|
|
238
|
+
* Neither the names of the Mozilla Foundation nor the names of project
|
|
239
|
+
contributors may be used to endorse or promote products derived from this
|
|
240
|
+
software without specific prior written permission.
|
|
241
|
+
|
|
242
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
243
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
244
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
245
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
246
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
247
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
248
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
249
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
250
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
251
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## tiny-invariant@1.3.3
|
|
255
|
+
|
|
256
|
+
Licence: MIT
|
|
257
|
+
|
|
258
|
+
File: `LICENSE`
|
|
259
|
+
|
|
260
|
+
```text
|
|
261
|
+
MIT License
|
|
262
|
+
|
|
263
|
+
Copyright (c) 2019 Alexander Reardon
|
|
264
|
+
|
|
265
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
266
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
267
|
+
in the Software without restriction, including without limitation the rights
|
|
268
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
269
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
270
|
+
furnished to do so, subject to the following conditions:
|
|
271
|
+
|
|
272
|
+
The above copyright notice and this permission notice shall be included in all
|
|
273
|
+
copies or substantial portions of the Software.
|
|
274
|
+
|
|
275
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
276
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
277
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
278
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
279
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
280
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
281
|
+
SOFTWARE.
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## tslib@2.8.1
|
|
285
|
+
|
|
286
|
+
Licence: 0BSD
|
|
287
|
+
|
|
288
|
+
File: `LICENSE.txt`
|
|
289
|
+
|
|
290
|
+
```text
|
|
291
|
+
Copyright (c) Microsoft Corporation.
|
|
292
|
+
|
|
293
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
294
|
+
purpose with or without fee is hereby granted.
|
|
295
|
+
|
|
296
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
297
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
298
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
299
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
300
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
301
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
302
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
303
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// src/codemod/bin.ts
|
|
3
|
+
/** The one line this bin writes to stderr before it runs. */
|
|
4
|
+
const DEPRECATION_WARNING = "warning: the modern-cmdk bin is deprecated and leaves in modern-cmdk 2.0; use npx modern-cmdk-codemod (strict by default). This bin runs the bundled codemod with the 1.x lenient exit codes unless --strict is given.";
|
|
5
|
+
/** The argv handed to the bundled CLI: --lenient is put first unless the caller gave --strict (the two flags exclude each other). */
|
|
6
|
+
function shimArgv(argv) {
|
|
7
|
+
return argv.includes("--strict") ? argv : ["--lenient", ...argv];
|
|
8
|
+
}
|
|
9
|
+
if (import.meta.main) {
|
|
10
|
+
process.stderr.write(`${DEPRECATION_WARNING}\n`);
|
|
11
|
+
const { run } = await import(`${/* @vite-ignore */ new URL(".", import.meta.url).href}cli.mjs`);
|
|
12
|
+
process.exitCode = await run(shimArgv(process.argv.slice(2)), process, { program: "modern-cmdk" });
|
|
13
|
+
}
|
|
14
|
+
export { DEPRECATION_WARNING, shimArgv };
|