astro 5.13.5 → 5.13.7
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/dist/assets/endpoint/generic.js +1 -1
- package/dist/assets/endpoint/node.js +1 -1
- package/dist/assets/utils/node/emitAsset.js +1 -1
- package/dist/content/content-layer.js +3 -3
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/encryption.js +6 -3
- package/dist/core/messages.js +2 -2
- package/dist/core/routing/manifest/create.js +1 -1
- package/dist/transitions/router.js +5 -7
- package/dist/vite-plugin-astro-server/route.d.ts +3 -3
- package/package.json +33 -33
|
@@ -84,7 +84,7 @@ const GET = async ({ request }) => {
|
|
|
84
84
|
return new Response("Internal Server Error", { status: 500 });
|
|
85
85
|
}
|
|
86
86
|
const { data, format } = await imageService.transform(inputBuffer, transform, imageConfig);
|
|
87
|
-
return new Response(data, {
|
|
87
|
+
return new Response(Buffer.from(data), {
|
|
88
88
|
status: 200,
|
|
89
89
|
headers: {
|
|
90
90
|
"Content-Type": mime.lookup(format) ?? `image/${format}`,
|
|
@@ -15,7 +15,7 @@ function keyFor(hash) {
|
|
|
15
15
|
return key;
|
|
16
16
|
}
|
|
17
17
|
async function handleSvgDeduplication(fileData, filename, fileEmitter) {
|
|
18
|
-
const contentHash = await generateContentHash(fileData);
|
|
18
|
+
const contentHash = await generateContentHash(Uint8Array.from(fileData).buffer);
|
|
19
19
|
const key = keyFor(contentHash);
|
|
20
20
|
const existing = svgContentCache.get(key);
|
|
21
21
|
if (existing) {
|
|
@@ -164,7 +164,7 @@ ${contentConfig.error.message}`);
|
|
|
164
164
|
logger.info("Content config changed");
|
|
165
165
|
shouldClear = true;
|
|
166
166
|
}
|
|
167
|
-
if (previousAstroVersion && previousAstroVersion !== "5.13.
|
|
167
|
+
if (previousAstroVersion && previousAstroVersion !== "5.13.7") {
|
|
168
168
|
logger.info("Astro version changed");
|
|
169
169
|
shouldClear = true;
|
|
170
170
|
}
|
|
@@ -172,8 +172,8 @@ ${contentConfig.error.message}`);
|
|
|
172
172
|
logger.info("Clearing content store");
|
|
173
173
|
this.#store.clearAll();
|
|
174
174
|
}
|
|
175
|
-
if ("5.13.
|
|
176
|
-
await this.#store.metaStore().set("astro-version", "5.13.
|
|
175
|
+
if ("5.13.7") {
|
|
176
|
+
await this.#store.metaStore().set("astro-version", "5.13.7");
|
|
177
177
|
}
|
|
178
178
|
if (currentConfigDigest) {
|
|
179
179
|
await this.#store.metaStore().set("content-config-digest", currentConfigDigest);
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -22,7 +22,7 @@ async function dev(inlineConfig) {
|
|
|
22
22
|
await telemetry.record([]);
|
|
23
23
|
const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
|
|
24
24
|
const logger = restart.container.logger;
|
|
25
|
-
const currentVersion = "5.13.
|
|
25
|
+
const currentVersion = "5.13.7";
|
|
26
26
|
const isPrerelease = currentVersion.includes("-");
|
|
27
27
|
if (!isPrerelease) {
|
|
28
28
|
try {
|
package/dist/core/encryption.js
CHANGED
|
@@ -35,7 +35,10 @@ async function encodeKey(key) {
|
|
|
35
35
|
}
|
|
36
36
|
async function decodeKey(encoded) {
|
|
37
37
|
const bytes = decodeBase64(encoded);
|
|
38
|
-
return crypto.subtle.importKey("raw", bytes, ALGORITHM, true, [
|
|
38
|
+
return crypto.subtle.importKey("raw", Buffer.from(bytes), ALGORITHM, true, [
|
|
39
|
+
"encrypt",
|
|
40
|
+
"decrypt"
|
|
41
|
+
]);
|
|
39
42
|
}
|
|
40
43
|
const encoder = new TextEncoder();
|
|
41
44
|
const decoder = new TextDecoder();
|
|
@@ -59,10 +62,10 @@ async function decryptString(key, encoded) {
|
|
|
59
62
|
const decryptedBuffer = await crypto.subtle.decrypt(
|
|
60
63
|
{
|
|
61
64
|
name: ALGORITHM,
|
|
62
|
-
iv
|
|
65
|
+
iv: Buffer.from(iv)
|
|
63
66
|
},
|
|
64
67
|
key,
|
|
65
|
-
dataArray
|
|
68
|
+
Buffer.from(dataArray)
|
|
66
69
|
);
|
|
67
70
|
const decryptedString = decoder.decode(decryptedBuffer);
|
|
68
71
|
return decryptedString;
|
package/dist/core/messages.js
CHANGED
|
@@ -37,7 +37,7 @@ function serverStart({
|
|
|
37
37
|
host,
|
|
38
38
|
base
|
|
39
39
|
}) {
|
|
40
|
-
const version = "5.13.
|
|
40
|
+
const version = "5.13.7";
|
|
41
41
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
42
42
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
43
43
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -274,7 +274,7 @@ function printHelp({
|
|
|
274
274
|
message.push(
|
|
275
275
|
linebreak(),
|
|
276
276
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
277
|
-
`v${"5.13.
|
|
277
|
+
`v${"5.13.7"}`
|
|
278
278
|
)} ${headline}`
|
|
279
279
|
);
|
|
280
280
|
}
|
|
@@ -24,7 +24,7 @@ import { getPattern } from "./pattern.js";
|
|
|
24
24
|
import { getRoutePrerenderOption } from "./prerender.js";
|
|
25
25
|
import { validateSegment } from "./segment.js";
|
|
26
26
|
const require2 = createRequire(import.meta.url);
|
|
27
|
-
const ROUTE_DYNAMIC_SPLIT = /\[(
|
|
27
|
+
const ROUTE_DYNAMIC_SPLIT = /\[([^[\]()]+(?:\([^)]+\))?)\]/;
|
|
28
28
|
const ROUTE_SPREAD = /^\.{3}.+$/;
|
|
29
29
|
function getParts(part, file) {
|
|
30
30
|
const result = [];
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { doPreparation, doSwap, TRANSITION_AFTER_SWAP } from "./events.js";
|
|
2
2
|
import { detectScriptExecuted } from "./swap-functions.js";
|
|
3
3
|
const inBrowser = import.meta.env.SSR === false;
|
|
4
|
-
const pushState = inBrowser && history.pushState.bind(history);
|
|
5
|
-
const replaceState = inBrowser && history.replaceState.bind(history);
|
|
6
4
|
const updateScrollPosition = (positions) => {
|
|
7
5
|
if (history.state) {
|
|
8
6
|
history.scrollRestoration = "manual";
|
|
9
|
-
replaceState({ ...history.state, ...positions }, "");
|
|
7
|
+
history.replaceState({ ...history.state, ...positions }, "");
|
|
10
8
|
}
|
|
11
9
|
};
|
|
12
10
|
const supportsViewTransitions = inBrowser && !!document.startViewTransition;
|
|
@@ -45,7 +43,7 @@ if (inBrowser) {
|
|
|
45
43
|
currentHistoryIndex = history.state.index;
|
|
46
44
|
scrollTo({ left: history.state.scrollX, top: history.state.scrollY });
|
|
47
45
|
} else if (transitionEnabledOnThisPage()) {
|
|
48
|
-
replaceState({ index: currentHistoryIndex, scrollX, scrollY }, "");
|
|
46
|
+
history.replaceState({ index: currentHistoryIndex, scrollX, scrollY }, "");
|
|
49
47
|
history.scrollRestoration = "manual";
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -112,7 +110,7 @@ const moveToLocation = (to, from, options, pageTitleForBrowserHistory, historySt
|
|
|
112
110
|
if (to.href !== location.href && !historyState) {
|
|
113
111
|
if (options.history === "replace") {
|
|
114
112
|
const current = history.state;
|
|
115
|
-
replaceState(
|
|
113
|
+
history.replaceState(
|
|
116
114
|
{
|
|
117
115
|
...options.state,
|
|
118
116
|
index: current.index,
|
|
@@ -123,7 +121,7 @@ const moveToLocation = (to, from, options, pageTitleForBrowserHistory, historySt
|
|
|
123
121
|
to.href
|
|
124
122
|
);
|
|
125
123
|
} else {
|
|
126
|
-
pushState(
|
|
124
|
+
history.pushState(
|
|
127
125
|
{ ...options.state, index: ++currentHistoryIndex, scrollX: 0, scrollY: 0 },
|
|
128
126
|
"",
|
|
129
127
|
to.href
|
|
@@ -144,7 +142,7 @@ const moveToLocation = (to, from, options, pageTitleForBrowserHistory, historySt
|
|
|
144
142
|
const savedState = history.state;
|
|
145
143
|
location.href = to.href;
|
|
146
144
|
if (!history.state) {
|
|
147
|
-
replaceState(savedState, "");
|
|
145
|
+
history.replaceState(savedState, "");
|
|
148
146
|
if (intraPage) {
|
|
149
147
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
150
148
|
}
|
|
@@ -11,15 +11,15 @@ interface MatchedRoute {
|
|
|
11
11
|
mod: ComponentInstance;
|
|
12
12
|
}
|
|
13
13
|
export declare function matchRoute(pathname: string, routesList: RoutesList, pipeline: DevPipeline): Promise<MatchedRoute | undefined>;
|
|
14
|
-
|
|
14
|
+
interface HandleRoute {
|
|
15
15
|
matchedRoute: AsyncReturnType<typeof matchRoute>;
|
|
16
16
|
url: URL;
|
|
17
17
|
pathname: string;
|
|
18
|
-
body:
|
|
18
|
+
body: BodyInit | undefined;
|
|
19
19
|
routesList: RoutesList;
|
|
20
20
|
incomingRequest: http.IncomingMessage;
|
|
21
21
|
incomingResponse: http.ServerResponse;
|
|
22
22
|
pipeline: DevPipeline;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
export declare function handleRoute({ matchedRoute, url, pathname, body, pipeline, routesList, incomingRequest, incomingResponse, }: HandleRoute): Promise<void>;
|
|
25
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.7",
|
|
4
4
|
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "withastro",
|
|
@@ -102,72 +102,72 @@
|
|
|
102
102
|
"@astrojs/compiler": "^2.12.2",
|
|
103
103
|
"@capsizecss/unpack": "^2.4.0",
|
|
104
104
|
"@oslojs/encoding": "^1.1.0",
|
|
105
|
-
"@rollup/pluginutils": "^5.
|
|
106
|
-
"acorn": "^8.
|
|
105
|
+
"@rollup/pluginutils": "^5.2.0",
|
|
106
|
+
"acorn": "^8.15.0",
|
|
107
107
|
"aria-query": "^5.3.2",
|
|
108
108
|
"axobject-query": "^4.1.0",
|
|
109
109
|
"boxen": "8.0.1",
|
|
110
|
-
"ci-info": "^4.
|
|
110
|
+
"ci-info": "^4.3.0",
|
|
111
111
|
"clsx": "^2.1.1",
|
|
112
112
|
"common-ancestor-path": "^1.0.1",
|
|
113
113
|
"cookie": "^1.0.2",
|
|
114
114
|
"cssesc": "^3.0.0",
|
|
115
|
-
"debug": "^4.4.
|
|
115
|
+
"debug": "^4.4.1",
|
|
116
116
|
"deterministic-object-hash": "^2.0.2",
|
|
117
117
|
"devalue": "^5.1.1",
|
|
118
118
|
"diff": "^5.2.0",
|
|
119
119
|
"dlv": "^1.1.3",
|
|
120
120
|
"dset": "^3.1.4",
|
|
121
|
-
"es-module-lexer": "^1.
|
|
121
|
+
"es-module-lexer": "^1.7.0",
|
|
122
122
|
"esbuild": "^0.25.0",
|
|
123
123
|
"estree-walker": "^3.0.3",
|
|
124
124
|
"flattie": "^1.1.1",
|
|
125
125
|
"fontace": "~0.3.0",
|
|
126
126
|
"github-slugger": "^2.0.0",
|
|
127
127
|
"html-escaper": "3.0.3",
|
|
128
|
-
"http-cache-semantics": "^4.
|
|
129
|
-
"import-meta-resolve": "^4.
|
|
128
|
+
"http-cache-semantics": "^4.2.0",
|
|
129
|
+
"import-meta-resolve": "^4.2.0",
|
|
130
130
|
"js-yaml": "^4.1.0",
|
|
131
131
|
"kleur": "^4.1.5",
|
|
132
|
-
"magic-string": "^0.30.
|
|
132
|
+
"magic-string": "^0.30.18",
|
|
133
133
|
"magicast": "^0.3.5",
|
|
134
134
|
"mrmime": "^2.0.1",
|
|
135
135
|
"neotraverse": "^0.6.18",
|
|
136
136
|
"p-limit": "^6.2.0",
|
|
137
137
|
"p-queue": "^8.1.0",
|
|
138
|
-
"package-manager-detector": "^1.
|
|
139
|
-
"picomatch": "^4.0.
|
|
138
|
+
"package-manager-detector": "^1.3.0",
|
|
139
|
+
"picomatch": "^4.0.3",
|
|
140
140
|
"prompts": "^2.4.2",
|
|
141
141
|
"rehype": "^13.0.2",
|
|
142
|
-
"semver": "^7.7.
|
|
143
|
-
"shiki": "^3.
|
|
144
|
-
"smol-toml": "^1.
|
|
142
|
+
"semver": "^7.7.2",
|
|
143
|
+
"shiki": "^3.12.0",
|
|
144
|
+
"smol-toml": "^1.4.2",
|
|
145
145
|
"tinyexec": "^0.3.2",
|
|
146
|
-
"tinyglobby": "^0.2.
|
|
147
|
-
"tsconfck": "^3.1.
|
|
146
|
+
"tinyglobby": "^0.2.14",
|
|
147
|
+
"tsconfck": "^3.1.6",
|
|
148
148
|
"ultrahtml": "^1.6.0",
|
|
149
|
-
"unifont": "~0.5.
|
|
149
|
+
"unifont": "~0.5.2",
|
|
150
150
|
"unist-util-visit": "^5.0.0",
|
|
151
|
-
"unstorage": "^1.
|
|
151
|
+
"unstorage": "^1.17.0",
|
|
152
152
|
"vfile": "^6.0.3",
|
|
153
|
-
"vite": "^6.3.
|
|
154
|
-
"vitefu": "^1.
|
|
153
|
+
"vite": "^6.3.6",
|
|
154
|
+
"vitefu": "^1.1.1",
|
|
155
155
|
"xxhash-wasm": "^1.1.0",
|
|
156
156
|
"yargs-parser": "^21.1.1",
|
|
157
|
-
"yocto-spinner": "^0.2.
|
|
158
|
-
"zod": "^3.
|
|
159
|
-
"zod-to-json-schema": "^3.24.
|
|
157
|
+
"yocto-spinner": "^0.2.3",
|
|
158
|
+
"zod": "^3.25.76",
|
|
159
|
+
"zod-to-json-schema": "^3.24.6",
|
|
160
160
|
"zod-to-ts": "^1.2.0",
|
|
161
161
|
"@astrojs/internal-helpers": "0.7.2",
|
|
162
162
|
"@astrojs/markdown-remark": "6.3.6",
|
|
163
163
|
"@astrojs/telemetry": "3.3.0"
|
|
164
164
|
},
|
|
165
165
|
"optionalDependencies": {
|
|
166
|
-
"sharp": "^0.
|
|
166
|
+
"sharp": "^0.34.0"
|
|
167
167
|
},
|
|
168
168
|
"devDependencies": {
|
|
169
169
|
"@astrojs/check": "^0.9.4",
|
|
170
|
-
"@playwright/test": "
|
|
170
|
+
"@playwright/test": "1.51.1",
|
|
171
171
|
"@types/aria-query": "^5.0.4",
|
|
172
172
|
"@types/common-ancestor-path": "^1.0.2",
|
|
173
173
|
"@types/cssesc": "^3.0.2",
|
|
@@ -182,25 +182,25 @@
|
|
|
182
182
|
"@types/prompts": "^2.4.9",
|
|
183
183
|
"@types/semver": "^7.7.0",
|
|
184
184
|
"@types/yargs-parser": "^21.0.3",
|
|
185
|
-
"cheerio": "1.
|
|
185
|
+
"cheerio": "1.1.2",
|
|
186
186
|
"eol": "^0.10.0",
|
|
187
187
|
"execa": "^8.0.1",
|
|
188
|
-
"expect-type": "^1.2.
|
|
189
|
-
"fs-fixture": "^2.
|
|
188
|
+
"expect-type": "^1.2.2",
|
|
189
|
+
"fs-fixture": "^2.8.1",
|
|
190
190
|
"mdast-util-mdx": "^3.0.0",
|
|
191
191
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
192
|
-
"node-mocks-http": "^1.
|
|
192
|
+
"node-mocks-http": "^1.17.2",
|
|
193
193
|
"parse-srcset": "^1.0.2",
|
|
194
194
|
"rehype-autolink-headings": "^7.1.0",
|
|
195
195
|
"rehype-slug": "^6.0.0",
|
|
196
196
|
"rehype-toc": "^3.0.2",
|
|
197
197
|
"remark-code-titles": "^0.1.2",
|
|
198
|
-
"rollup": "^4.
|
|
199
|
-
"sass": "^1.
|
|
200
|
-
"typescript": "^5.
|
|
198
|
+
"rollup": "^4.50.0",
|
|
199
|
+
"sass": "^1.91.0",
|
|
200
|
+
"typescript": "^5.9.2",
|
|
201
201
|
"undici": "^6.21.3",
|
|
202
202
|
"unified": "^11.0.5",
|
|
203
|
-
"vitest": "^3.
|
|
203
|
+
"vitest": "^3.2.4",
|
|
204
204
|
"astro-scripts": "0.0.14"
|
|
205
205
|
},
|
|
206
206
|
"engines": {
|