@scrabble-solver/scrabble-solver 2.16.0-alpha.1 → 2.16.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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/.next/prerender-manifest.json +4 -4
- package/.next/routes-manifest.json +33 -2
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/server/pages/not-found.html +1 -1
- package/.next/trace +21 -21
- package/.next/trace-build +1 -1
- package/next.config.js +13 -0
- package/package.json +9 -9
- package/src/pages/index.tsx +7 -2
- /package/.next/static/{YS42EFHDGPCCe3JyeXaNi → pw-RjyxoPdU0jV0ImxbXX}/_buildManifest.js +0 -0
- /package/.next/static/{YS42EFHDGPCCe3JyeXaNi → pw-RjyxoPdU0jV0ImxbXX}/_ssgManifest.js +0 -0
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-typescript","duration":
|
|
1
|
+
[{"name":"run-typescript","duration":1945458,"timestamp":20189527449,"id":13,"parentId":1,"tags":{},"startTime":1777411469529,"traceId":"26b661378ec1790a"},{"name":"run-webpack","duration":6021387,"timestamp":20191474621,"id":15,"parentId":1,"tags":{},"startTime":1777411471476,"traceId":"26b661378ec1790a"},{"name":"static-check","duration":169557,"timestamp":20197557367,"id":2026,"parentId":1,"tags":{},"startTime":1777411477559,"traceId":"26b661378ec1790a"},{"name":"static-generation","duration":865466,"timestamp":20197735389,"id":2044,"parentId":1,"tags":{},"startTime":1777411477737,"traceId":"26b661378ec1790a"},{"name":"collect-build-traces","duration":3563192,"timestamp":20197727240,"id":2041,"parentId":1,"tags":{},"startTime":1777411477729,"traceId":"26b661378ec1790a"},{"name":"telemetry-flush","duration":21,"timestamp":20201291683,"id":2056,"parentId":1,"tags":{},"startTime":1777411481293,"traceId":"26b661378ec1790a"},{"name":"next-build","duration":11995899,"timestamp":20189295808,"id":1,"tags":{"buildMode":"default","version":"16.2.4","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1777411469297,"traceId":"26b661378ec1790a"}]
|
package/next.config.js
CHANGED
|
@@ -10,6 +10,19 @@ module.exports = {
|
|
|
10
10
|
loadPaths: ['./src', path.join(__dirname, '../../node_modules/include-media/dist')],
|
|
11
11
|
quietDeps: true,
|
|
12
12
|
},
|
|
13
|
+
// Force HTML revalidation on every navigation. Next.js's SSG ETag is derived from
|
|
14
|
+
// the page-data hash (the getStaticProps output), so getStaticProps embeds a per-build
|
|
15
|
+
// SHA to make that hash — and therefore the ETag — change between deploys. Without
|
|
16
|
+
// it, an unchanged page-data lets the browser 304 stale HTML that points at chunks
|
|
17
|
+
// the new server no longer has.
|
|
18
|
+
async headers() {
|
|
19
|
+
const cacheControl = { key: 'Cache-Control', value: 'public, max-age=0, must-revalidate' };
|
|
20
|
+
return [
|
|
21
|
+
{ source: '/', headers: [cacheControl] },
|
|
22
|
+
{ source: '/404', headers: [cacheControl] },
|
|
23
|
+
{ source: '/not-found', headers: [cacheControl] },
|
|
24
|
+
];
|
|
25
|
+
},
|
|
13
26
|
webpack(config, { isServer, dev }) {
|
|
14
27
|
config.module.rules.push({
|
|
15
28
|
test: /\.svg$/i,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/scrabble-solver",
|
|
3
|
-
"version": "2.16.0
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - App",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"@floating-ui/react": "^0.27.19",
|
|
30
30
|
"@kamilmielnik/trie": "^4.0.0",
|
|
31
31
|
"@reduxjs/toolkit": "^2.11.2",
|
|
32
|
-
"@scrabble-solver/configs": "^2.16.0
|
|
33
|
-
"@scrabble-solver/constants": "^2.16.0
|
|
34
|
-
"@scrabble-solver/dictionaries": "^2.16.0
|
|
35
|
-
"@scrabble-solver/logger": "^2.16.0
|
|
36
|
-
"@scrabble-solver/solver": "^2.16.0
|
|
37
|
-
"@scrabble-solver/types": "^2.16.0
|
|
38
|
-
"@scrabble-solver/word-definitions": "^2.16.0
|
|
32
|
+
"@scrabble-solver/configs": "^2.16.0",
|
|
33
|
+
"@scrabble-solver/constants": "^2.16.0",
|
|
34
|
+
"@scrabble-solver/dictionaries": "^2.16.0",
|
|
35
|
+
"@scrabble-solver/logger": "^2.16.0",
|
|
36
|
+
"@scrabble-solver/solver": "^2.16.0",
|
|
37
|
+
"@scrabble-solver/types": "^2.16.0",
|
|
38
|
+
"@scrabble-solver/word-definitions": "^2.16.0",
|
|
39
39
|
"classnames": "^2.5.1",
|
|
40
40
|
"env-cmd": "^11.0.0",
|
|
41
41
|
"include-media": "^2.0.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"@types/redux": "^3.6.31",
|
|
71
71
|
"sass": "^1.99.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "b1606c5d93d48bcdedc27c7367cb24643e5a999c"
|
|
74
74
|
}
|
package/src/pages/index.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-statements */
|
|
2
2
|
|
|
3
3
|
import { isObject } from '@scrabble-solver/types';
|
|
4
|
+
import { execSync } from 'child_process';
|
|
4
5
|
import fs from 'fs';
|
|
5
6
|
import path from 'path';
|
|
6
7
|
import { type FunctionComponent, useCallback, useState } from 'react';
|
|
@@ -137,9 +138,13 @@ const Index: FunctionComponent<Props> = ({ version }) => {
|
|
|
137
138
|
);
|
|
138
139
|
};
|
|
139
140
|
|
|
140
|
-
export const getStaticProps = async ()
|
|
141
|
+
export const getStaticProps = async () => {
|
|
141
142
|
const version = await readVersion();
|
|
142
|
-
|
|
143
|
+
// Inlined into __NEXT_DATA__ so the page-data hash (which feeds Next.js's SSG ETag)
|
|
144
|
+
// changes per build, letting browsers cache HTML and 304 within a build but pull
|
|
145
|
+
// fresh markup after a deploy. Not consumed by the component.
|
|
146
|
+
const buildSha = execSync('git rev-parse HEAD').toString().trim();
|
|
147
|
+
return { props: { version, buildSha } };
|
|
143
148
|
};
|
|
144
149
|
|
|
145
150
|
const readVersion = async (): Promise<string> => {
|
|
File without changes
|
|
File without changes
|