Commit 18b18e2
authored
### Why?
When the package.json has Next.js version with a tag instead of a
specific version, e.g., `"next": "canary"`, it received an error:
```
Failed to pull docs: Could not find documentation for Next.js vcanary. This version may not exist on GitHub yet.
```
### How?
Modified logic to get version to use `require.resolve()`.
#### Before
https://github.com/user-attachments/assets/487d0404-ad81-4c5c-a341-cab9a0e03020
#### After
https://github.com/user-attachments/assets/4153873f-681f-4c46-8ee0-ee7913749b7b
1 parent ee76e30 commit 18b18e2
File tree
7 files changed
+65
-34
lines changed- packages/next-codemod/lib
- __tests__
- fixtures/agents-md
- next-specific-version
- node_modules/next
- next-tag
- node_modules/next
7 files changed
+65
-34
lines changedLines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
294 | 326 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 19 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
40 | 24 | | |
41 | 25 | | |
42 | 26 | | |
| |||
56 | 40 | | |
57 | 41 | | |
58 | 42 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 43 | | |
65 | 44 | | |
66 | 45 | | |
| |||
525 | 504 | | |
526 | 505 | | |
527 | 506 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | 507 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
537 | 514 | | |
538 | 515 | | |
539 | | - | |
| 516 | + | |
540 | 517 | | |
541 | 518 | | |
542 | 519 | | |
| |||
0 commit comments