@prezly/theme-kit-nextjs 10.5.0 → 10.5.1

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 CHANGED
@@ -132,17 +132,14 @@ function App({ Component, pageProps }: AppProps<AnyPageProps>) {
132
132
  // This can happen due to connection issues, or incorrect credentials in your .env file.
133
133
  // In this case, a 500 error page would be rendered, which shouldn't rely on the Newsroom Context (especially when statically generated).
134
134
  if(!newsroomContextProps) {
135
- // eslint-disable-next-line react/jsx-props-no-spreading
136
135
  return <Component {...customPageProps} />
137
136
  }
138
137
 
139
- /* eslint-disable react/jsx-props-no-spreading */
140
138
  return (
141
139
  <NewsroomContextProvider {...newsroomContextProps}>
142
140
  <Component {...customPageProps} />
143
141
  </NewsroomContextProvider>
144
142
  );
145
- /* eslint-enable react/jsx-props-no-spreading */
146
143
  }
147
144
 
148
145
  export default App;
@@ -69,7 +69,7 @@ function _generateStoryPageMetadata() {
69
69
  alternates: {
70
70
  canonical,
71
71
  types: _sdk.Story.isPublished(story) ? {
72
- ["application/json"]: "".concat(oembed.url, ".json")
72
+ 'application/json': "".concat(oembed.url, ".json")
73
73
  } : undefined
74
74
  },
75
75
  robots: isPreview || isSecret || isPrivateStory || isEmbargoStory || isConfidentialStory ? {
@@ -63,7 +63,7 @@ function _generateStoryPageMetadata() {
63
63
  alternates: {
64
64
  canonical,
65
65
  types: Story.isPublished(story) ? {
66
- ["application/json"]: "".concat(oembed.url, ".json")
66
+ 'application/json': "".concat(oembed.url, ".json")
67
67
  } : undefined
68
68
  },
69
69
  robots: isPreview || isSecret || isPrivateStory || isEmbargoStory || isConfidentialStory ? {
@@ -19,7 +19,7 @@ var MetadataAdapter;
19
19
  function connect(configuration) {
20
20
  function generatePageMetadata(params) {
21
21
  var {
22
- generateUrl
22
+ generateUrl: _
23
23
  } = configuration,
24
24
  prerequisites = _objectWithoutProperties(configuration, _excluded);
25
25
  for (var _len = arguments.length, metadata = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -12,7 +12,7 @@ export var MetadataAdapter;
12
12
  function connect(configuration) {
13
13
  function generatePageMetadata(params) {
14
14
  var {
15
- generateUrl
15
+ generateUrl: _
16
16
  } = configuration,
17
17
  prerequisites = _objectWithoutProperties(configuration, _excluded);
18
18
  for (var _len = arguments.length, metadata = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -1,3 +1,2 @@
1
- // eslint-disable-next-line import/extensions
2
1
  import * as _RoutingAdapter from "./lib/RoutingAdapter.client.mjs";
3
2
  export { _RoutingAdapter as RoutingAdapter };
@@ -20,7 +20,7 @@ function connect() {
20
20
  value = _objectWithoutProperties(props, _excluded);
21
21
  return /*#__PURE__*/_react.default.createElement(context.Provider, {
22
22
  value: value
23
- }, props.children);
23
+ }, children);
24
24
  }
25
25
  function useRouting() {
26
26
  var value = (0, _react.useContext)(context);
@@ -41,8 +41,6 @@ function connect() {
41
41
  toLocaleSlug
42
42
  });
43
43
  }, [routes, locales, defaultLocale, toLocaleSlug]);
44
-
45
- // @ts-ignore
46
44
  return {
47
45
  generateUrl
48
46
  };
@@ -14,7 +14,7 @@ export function connect() {
14
14
  value = _objectWithoutProperties(props, _excluded);
15
15
  return /*#__PURE__*/React.createElement(context.Provider, {
16
16
  value: value
17
- }, props.children);
17
+ }, children);
18
18
  }
19
19
  function useRouting() {
20
20
  var value = useContext(context);
@@ -35,8 +35,6 @@ export function connect() {
35
35
  toLocaleSlug
36
36
  });
37
37
  }, [routes, locales, defaultLocale, toLocaleSlug]);
38
-
39
- // @ts-ignore
40
38
  return {
41
39
  generateUrl
42
40
  };
@@ -1,5 +1,3 @@
1
1
  export { Route, Router, Routing } from '@prezly/theme-kit-core';
2
-
3
- // eslint-disable-next-line import/extensions
4
2
  import * as _RoutingAdapter from "./lib/RoutingAdapter.server.mjs";
5
3
  export { _RoutingAdapter as RoutingAdapter };
@@ -47,7 +47,6 @@ function createPlaywrightConfig(_ref) {
47
47
  /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
48
48
  actionTimeout: 0,
49
49
  /* Base URL to use in actions like `await page.goto('/')`. */
50
- // eslint-disable-next-line @typescript-eslint/naming-convention
51
50
  baseURL: baseUrl,
52
51
  /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
53
52
  trace: 'on-first-retry',
@@ -41,7 +41,6 @@ export function createPlaywrightConfig(_ref) {
41
41
  /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
42
42
  actionTimeout: 0,
43
43
  /* Base URL to use in actions like `await page.goto('/')`. */
44
- // eslint-disable-next-line @typescript-eslint/naming-convention
45
44
  baseURL: baseUrl,
46
45
  /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
47
46
  trace: 'on-first-retry',
@@ -30,7 +30,7 @@ function shouldExceptionBeIgnored(exception) {
30
30
 
31
31
  // Ignore global code errors that are not related to the application code.
32
32
  // See comments in `IGNORED_EVENT_CULPRITS` const for context on each entry
33
- if (stacktrace && (_stacktrace$frames = stacktrace.frames) !== null && _stacktrace$frames !== void 0 && _stacktrace$frames.some(shouldStackFrameBeIgnored)) {
33
+ if (stacktrace !== null && stacktrace !== void 0 && (_stacktrace$frames = stacktrace.frames) !== null && _stacktrace$frames !== void 0 && _stacktrace$frames.some(shouldStackFrameBeIgnored)) {
34
34
  return true;
35
35
  }
36
36
  return false;
@@ -24,7 +24,7 @@ function shouldExceptionBeIgnored(exception) {
24
24
 
25
25
  // Ignore global code errors that are not related to the application code.
26
26
  // See comments in `IGNORED_EVENT_CULPRITS` const for context on each entry
27
- if (stacktrace && (_stacktrace$frames = stacktrace.frames) !== null && _stacktrace$frames !== void 0 && _stacktrace$frames.some(shouldStackFrameBeIgnored)) {
27
+ if (stacktrace !== null && stacktrace !== void 0 && (_stacktrace$frames = stacktrace.frames) !== null && _stacktrace$frames !== void 0 && _stacktrace$frames.some(shouldStackFrameBeIgnored)) {
28
28
  return true;
29
29
  }
30
30
  return false;
package/package.json CHANGED
@@ -1,112 +1,115 @@
1
1
  {
2
- "name": "@prezly/theme-kit-nextjs",
3
- "version": "10.5.0",
4
- "description": "Data layer and utility library for developing Prezly themes with NextJS",
5
- "type": "module",
6
- "main": "build/index.mjs",
7
- "types": "build/index.d.ts",
8
- "files": [
9
- "build",
10
- "README.md"
11
- ],
12
- "exports": {
13
- ".": {
14
- "types": "./build/index.d.ts",
15
- "require": "./build/index.cjs",
16
- "default": "./build/index.mjs"
2
+ "name": "@prezly/theme-kit-nextjs",
3
+ "version": "10.5.1",
4
+ "description": "Data layer and utility library for developing Prezly themes with NextJS",
5
+ "type": "module",
6
+ "main": "build/index.mjs",
7
+ "types": "build/index.d.ts",
8
+ "files": [
9
+ "build",
10
+ "README.md"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./build/index.d.ts",
15
+ "require": "./build/index.cjs",
16
+ "default": "./build/index.mjs"
17
+ },
18
+ "./server": {
19
+ "types": "./build/server.d.ts",
20
+ "require": "./build/server.cjs",
21
+ "default": "./build/server.mjs"
22
+ },
23
+ "./middleware": {
24
+ "types": "./build/middleware/index.d.ts",
25
+ "require": "./build/middleware/index.cjs",
26
+ "default": "./build/middleware/index.mjs"
27
+ },
28
+ "./next-config": {
29
+ "types": "./build/next-config/index.d.ts",
30
+ "require": "./build/next-config/index.cjs",
31
+ "default": "./build/next-config/index.mjs"
32
+ },
33
+ "./sentry": {
34
+ "types": "./build/sentry/index.d.ts",
35
+ "require": "./build/sentry/index.cjs",
36
+ "default": "./build/sentry/index.mjs"
37
+ },
38
+ "./playwright": {
39
+ "types": "./build/playwright/index.d.ts",
40
+ "require": "./build/playwright/index.cjs",
41
+ "default": "./build/playwright/index.mjs"
42
+ }
17
43
  },
18
- "./server": {
19
- "types": "./build/server.d.ts",
20
- "require": "./build/server.cjs",
21
- "default": "./build/server.mjs"
44
+ "engines": {
45
+ "node": ">= 16.x",
46
+ "npm": ">= 8.x"
22
47
  },
23
- "./middleware": {
24
- "types": "./build/middleware/index.d.ts",
25
- "require": "./build/middleware/index.cjs",
26
- "default": "./build/middleware/index.mjs"
48
+ "devEngines": {
49
+ "node": ">= 16.x",
50
+ "npm": ">= 8.x"
27
51
  },
28
- "./next-config": {
29
- "types": "./build/next-config/index.d.ts",
30
- "require": "./build/next-config/index.cjs",
31
- "default": "./build/next-config/index.mjs"
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/prezly/theme-kit-js.git",
55
+ "directory": "packages/nextjs"
32
56
  },
33
- "./sentry": {
34
- "types": "./build/sentry/index.d.ts",
35
- "require": "./build/sentry/index.cjs",
36
- "default": "./build/sentry/index.mjs"
57
+ "keywords": [
58
+ "prezly",
59
+ "nextjs"
60
+ ],
61
+ "author": "Prezly Team",
62
+ "license": "MIT",
63
+ "bugs": {
64
+ "url": "https://github.com/prezly/theme-kit-js/issues"
37
65
  },
38
- "./playwright": {
39
- "types": "./build/playwright/index.d.ts",
40
- "require": "./build/playwright/index.cjs",
41
- "default": "./build/playwright/index.mjs"
42
- }
43
- },
44
- "engines": {
45
- "node": ">= 16.x",
46
- "npm": ">= 8.x"
47
- },
48
- "devEngines": {
49
- "node": ">= 16.x",
50
- "npm": ">= 8.x"
51
- },
52
- "repository": {
53
- "type": "git",
54
- "url": "git+https://github.com/prezly/theme-kit-js.git",
55
- "directory": "packages/nextjs"
56
- },
57
- "keywords": [
58
- "prezly",
59
- "nextjs"
60
- ],
61
- "author": "Prezly Team",
62
- "license": "MIT",
63
- "bugs": {
64
- "url": "https://github.com/prezly/theme-kit-js/issues"
65
- },
66
- "homepage": "https://github.com/prezly/theme-kit-js/tree/main/packages/nextjs#readme",
67
- "scripts": {
68
- "prebuild": "rimraf build/* *.tsbuildinfo",
69
- "build": "pnpm build:types && pnpm build:esm && pnpm build:cjs",
70
- "build:types": "tsc --project .",
71
- "build:esm": "babel --config-file=../../babel.esm.json src/ --extensions=.ts,.tsx --out-dir=build/ --out-file-extension=.mjs",
72
- "build:cjs": "babel --config-file=../../babel.cjs.json src/ --extensions=.ts,.tsx --out-dir=build/ --out-file-extension=.cjs",
73
- "dev": "tsc --watch --preserveWatchOutput --project .",
74
- "typecheck": "tsc --noEmit --emitDeclarationOnly false --incremental --project .",
75
- "lint": "eslint src",
76
- "test": "pnpm test:build",
77
- "test:build": "pnpm test:build:cjs && pnpm test:build:esm && pnpm test:build:types",
78
- "test:build:types": "tsc --esModuleInterop --noEmit build/index.d.ts",
79
- "test:build:esm": "node tests/test-build.mjs",
80
- "test:build:cjs": "node tests/test-build.cjs"
81
- },
82
- "peerDependencies": {
83
- "@playwright/test": "1.x",
84
- "@prezly/sdk": "21.12.0 || ^23.x",
85
- "next": "^14.x || ^15.x",
86
- "react": "^18.x || ^19.x",
87
- "react-dom": "^18.x || ^19.x"
88
- },
89
- "peerDependenciesMeta": {
90
- "@playwright/test": {
91
- "optional": true
92
- }
93
- },
94
- "dependencies": {
95
- "@prezly/theme-kit-core": "^10.5.0",
96
- "@prezly/theme-kit-intl": "^10.5.0",
97
- "@prezly/theme-kit-react": "^10.5.0",
98
- "@technically/is-not-undefined": "^1.0.0",
99
- "@technically/omit-undefined": "^1.0.4",
100
- "json-stable-stringify": "^1.2.1",
101
- "redis": "^4.7.0",
102
- "url-pattern": "^1.0.3"
103
- },
104
- "devDependencies": {
105
- "@sentry/nextjs": "7.120.4"
106
- },
107
- "publishConfig": {
108
- "access": "public"
109
- },
110
- "sideEffects": false,
111
- "gitHead": "fba05f52e06db45ecab4e82c157be7f59fad04f3"
66
+ "homepage": "https://github.com/prezly/theme-kit-js/tree/main/packages/nextjs#readme",
67
+ "scripts": {
68
+ "prebuild": "rimraf build/* *.tsbuildinfo",
69
+ "build": "pnpm build:types && pnpm build:esm && pnpm build:cjs",
70
+ "build:types": "tsc --project .",
71
+ "build:esm": "babel --config-file=../../babel.esm.json src/ --extensions=.ts,.tsx --out-dir=build/ --out-file-extension=.mjs",
72
+ "build:cjs": "babel --config-file=../../babel.cjs.json src/ --extensions=.ts,.tsx --out-dir=build/ --out-file-extension=.cjs",
73
+ "dev": "tsc --watch --preserveWatchOutput --project .",
74
+ "typecheck": "tsc --noEmit --emitDeclarationOnly false --incremental --project .",
75
+ "lint": "biome lint src",
76
+ "lint:fix": "biome lint --write src",
77
+ "format": "biome format src",
78
+ "format:fix": "biome format --write src",
79
+ "test": "pnpm test:build",
80
+ "test:build": "pnpm test:build:cjs && pnpm test:build:esm && pnpm test:build:types",
81
+ "test:build:types": "tsc --esModuleInterop --noEmit build/index.d.ts",
82
+ "test:build:esm": "node tests/test-build.mjs",
83
+ "test:build:cjs": "node tests/test-build.cjs"
84
+ },
85
+ "peerDependencies": {
86
+ "@playwright/test": "1.x",
87
+ "@prezly/sdk": "21.12.0 || ^23.x",
88
+ "next": "^14.x || ^15.x",
89
+ "react": "^18.x || ^19.x",
90
+ "react-dom": "^18.x || ^19.x"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "@playwright/test": {
94
+ "optional": true
95
+ }
96
+ },
97
+ "dependencies": {
98
+ "@prezly/theme-kit-core": "^10.5.1",
99
+ "@prezly/theme-kit-intl": "^10.5.1",
100
+ "@prezly/theme-kit-react": "^10.5.1",
101
+ "@technically/is-not-undefined": "^1.0.0",
102
+ "@technically/omit-undefined": "^1.0.4",
103
+ "json-stable-stringify": "^1.2.1",
104
+ "redis": "^4.7.0",
105
+ "url-pattern": "^1.0.3"
106
+ },
107
+ "devDependencies": {
108
+ "@sentry/nextjs": "7.120.4"
109
+ },
110
+ "publishConfig": {
111
+ "access": "public"
112
+ },
113
+ "sideEffects": false,
114
+ "gitHead": "92943e87b4ec5a60d9b04c63f2404075d6864420"
112
115
  }