@nifrajs/ts-plugin 5.9.0 → 5.10.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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @nifrajs/ts-plugin
|
|
2
2
|
|
|
3
|
+
## 5.10.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 16696fb: The README names `href({ to })` and `rawHref()` as the links go-to-definition follows, and a route-table pattern such as `"/users/:id"` resolves to its file.
|
|
8
|
+
- Updated dependencies [535c4e5]
|
|
9
|
+
- Updated dependencies [87e7fd9]
|
|
10
|
+
- Updated dependencies [611a3be]
|
|
11
|
+
- Updated dependencies [7f32bb2]
|
|
12
|
+
- Updated dependencies [0aa10d0]
|
|
13
|
+
- Updated dependencies [ab69ee6]
|
|
14
|
+
- Updated dependencies [548bade]
|
|
15
|
+
- Updated dependencies [d2066e0]
|
|
16
|
+
- Updated dependencies [7e292dd]
|
|
17
|
+
- Updated dependencies [a6af4c9]
|
|
18
|
+
- Updated dependencies [e465ed5]
|
|
19
|
+
- Updated dependencies [683c3d6]
|
|
20
|
+
- Updated dependencies [824a75e]
|
|
21
|
+
- Updated dependencies [d2066e0]
|
|
22
|
+
- Updated dependencies [5845e1c]
|
|
23
|
+
- Updated dependencies [5d1be78]
|
|
24
|
+
- Updated dependencies [1faf86c]
|
|
25
|
+
- Updated dependencies [950996b]
|
|
26
|
+
- @nifrajs/web@5.10.0
|
|
27
|
+
- @nifrajs/core@5.10.0
|
|
28
|
+
|
|
3
29
|
## 5.9.0
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @nifrajs/ts-plugin
|
|
2
2
|
|
|
3
|
-
A TypeScript language-service plugin for [nifra](https://github.com/nifrajs/nifra). It adds go-to-definition on route-path string literals: put your cursor on `"/orders"` in `
|
|
3
|
+
A TypeScript language-service plugin for [nifra](https://github.com/nifrajs/nifra). It adds go-to-definition on route-path string literals: put your cursor on `"/orders"` in `href({ to: "/orders" })`, `rawHref("/orders")`, or `<a href="/orders">`, and jump straight to the `routes/` file that serves it. A route-table pattern such as `"/users/:id"` resolves to its file too.
|
|
4
4
|
|
|
5
5
|
The routing rules are nifra's own - it discovers routes with `@nifrajs/web` and matches them with `@nifrajs/core`'s pattern matcher - so a path resolves to exactly the file it would serve at runtime, dynamic segments included (`/users/42` → `routes/users/[id].tsx`).
|
|
6
6
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAA;AAIrC,sGAAsG;AACtG,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAoB,GAC1C,MAAM,GAAG,SAAS,CASpB;AAgMD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,OAAO,EAAE,EACd,MAAM,EAAE,EAAE,CAAC,UAAU,EACrB,QAAQ,EAAE,MAAM,GACf;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAA;CAAE,GAAG,SAAS,CAMjD;AA4CD,iBAAS,IAAI,CAAC,OAAO,EAAE;IAAE,UAAU,EAAE,OAAO,EAAE,CAAA;CAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CA0DxE;AAED,eAAe,IAAI,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nifrajs/ts-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"description": "TypeScript language-service plugin for nifra - go-to-definition from a route-path string literal to the routes/ file that serves it, and the frontend/backend zone rules as editor errors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"build": "bun run build.ts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@nifrajs/core": "5.
|
|
52
|
-
"@nifrajs/web": "5.
|
|
51
|
+
"@nifrajs/core": "5.10.0",
|
|
52
|
+
"@nifrajs/web": "5.10.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"typescript": ">=5.5.0"
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@nifrajs/ts-plugin` - a TypeScript language-service plugin. It adds two things to the editor:
|
|
3
3
|
* - go-to-definition on a route-path string literal jumps to the `routes/` file that serves it, so
|
|
4
|
-
* `
|
|
4
|
+
* `href({ to: "/orders" })`, `rawHref("/orders")`, or `<a href="/orders">` are click-through, and so is a
|
|
5
|
+
* route-table pattern such as `"/users/:id"`;
|
|
5
6
|
* - the frontend/backend zone rules as errors on the import that breaks them (see ./zones.ts).
|
|
6
7
|
*
|
|
7
8
|
* Wire it up in a project's tsconfig:
|