@nimpl/getters 2.2.1-canary.0 → 2.2.2
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/LICENSE +2 -0
- package/get-app-params.js +1 -1
- package/get-app-pathname.js +1 -2
- package/get-params.js +1 -1
- package/get-pathname.js +1 -2
- package/package.json +13 -13
- package/server-getter-in-client-component-error.js +1 -2
package/LICENSE
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
+
Copyright (c) 2025 Alex Savelyev <dev@alexdln.com>
|
|
4
|
+
|
|
3
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
6
|
|
|
5
7
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
package/get-app-params.js
CHANGED
|
@@ -46,7 +46,7 @@ const getAppParams = (options = {}) => {
|
|
|
46
46
|
isInvalid = true;
|
|
47
47
|
}
|
|
48
48
|
if (isInvalid && !ignoreDifferenceError) {
|
|
49
|
-
const createIssueUrl = new URL("https://github.com/
|
|
49
|
+
const createIssueUrl = new URL("https://github.com/alexdln/nimpl-getters/issues/new");
|
|
50
50
|
createIssueUrl.searchParams.set("title", "Error parsing segments in get-params");
|
|
51
51
|
createIssueUrl.searchParams.set("body", `urlPathname: \`${urlPathname}\`;\n\npagePath(s): \`${pagePaths || pagePath}\`;`);
|
|
52
52
|
createIssueUrl.searchParams.append("labels", "bug");
|
package/get-app-pathname.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAppPathname =
|
|
3
|
+
exports.getAppPathname = getAppPathname;
|
|
4
4
|
const work_unit_async_storage_external_1 = require("next/dist/server/app-render/work-unit-async-storage.external");
|
|
5
5
|
const server_getter_in_client_component_error_1 = require("./server-getter-in-client-component-error");
|
|
6
6
|
function getAppPathname() {
|
|
@@ -14,4 +14,3 @@ function getAppPathname() {
|
|
|
14
14
|
const pathnameTag = pageTags[pageTags.length - 1];
|
|
15
15
|
return pathnameTag.substring(5);
|
|
16
16
|
}
|
|
17
|
-
exports.getAppPathname = getAppPathname;
|
package/get-params.js
CHANGED
|
@@ -48,7 +48,7 @@ const getParams = (options = {}) => {
|
|
|
48
48
|
isInvalid = true;
|
|
49
49
|
}
|
|
50
50
|
if (isInvalid && !ignoreDifferenceError) {
|
|
51
|
-
const createIssueUrl = new URL("https://github.com/
|
|
51
|
+
const createIssueUrl = new URL("https://github.com/alexdln/nimpl-getters/issues/new");
|
|
52
52
|
createIssueUrl.searchParams.set("title", "Error parsing segments in get-params");
|
|
53
53
|
createIssueUrl.searchParams.set("body", `urlPathname: \`${urlPathname}\`;\n\npagePath(s): \`${pagePaths || pagePath}\`;`);
|
|
54
54
|
createIssueUrl.searchParams.append("labels", "bug");
|
package/get-pathname.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPathname =
|
|
3
|
+
exports.getPathname = getPathname;
|
|
4
4
|
const work_async_storage_external_1 = require("next/dist/server/app-render/work-async-storage.external");
|
|
5
5
|
const work_unit_async_storage_external_1 = require("next/dist/server/app-render/work-unit-async-storage.external");
|
|
6
6
|
const has_base_path_1 = require("next/dist/client/has-base-path");
|
|
@@ -25,4 +25,3 @@ function getPathname() {
|
|
|
25
25
|
const pathname = (0, has_base_path_1.hasBasePath)(url.pathname) ? (0, remove_base_path_1.removeBasePath)(url.pathname) : url.pathname;
|
|
26
26
|
return pathname;
|
|
27
27
|
}
|
|
28
|
-
exports.getPathname = getPathname;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimpl/getters",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Implementation of server getters in React Server Components without switching to SSR in next.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
],
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "git://github.com/
|
|
26
|
+
"url": "git://github.com/alexdln/nimpl-getters.git"
|
|
27
27
|
},
|
|
28
28
|
"author": {
|
|
29
|
-
"name": "Savelyev
|
|
30
|
-
"email": "
|
|
31
|
-
"url": "https://github.com/
|
|
29
|
+
"name": "Alex Savelyev",
|
|
30
|
+
"email": "dev@alexdln.com",
|
|
31
|
+
"url": "https://github.com/alexdln/"
|
|
32
32
|
},
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/node": "
|
|
36
|
-
"@types/react": "
|
|
37
|
-
"
|
|
38
|
-
"react
|
|
39
|
-
"
|
|
40
|
-
"typescript": "5.
|
|
35
|
+
"@types/node": "25.0.3",
|
|
36
|
+
"@types/react": "19.2.7",
|
|
37
|
+
"next": "16.1.1",
|
|
38
|
+
"react": "19.2.3",
|
|
39
|
+
"react-dom": "19.2.3",
|
|
40
|
+
"typescript": "5.9.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
+
"next": ">= 14.0.0",
|
|
43
44
|
"react": ">= 18.2.0",
|
|
44
|
-
"react-dom": ">= 18.2.0"
|
|
45
|
-
"next": ">= 14.0.0"
|
|
45
|
+
"react-dom": ">= 18.2.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.serverGetterInClientComponentError =
|
|
6
|
+
exports.serverGetterInClientComponentError = serverGetterInClientComponentError;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
function serverGetterInClientComponentError(getterName) {
|
|
9
9
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -13,4 +13,3 @@ function serverGetterInClientComponentError(getterName) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
exports.serverGetterInClientComponentError = serverGetterInClientComponentError;
|