astro 7.1.1 → 7.1.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/dist/cli/infra/build-time-astro-version-provider.js +1 -1
- package/dist/content/content-layer.js +3 -3
- package/dist/content/mutable-data-store.js +2 -2
- package/dist/content/runtime.js +2 -2
- package/dist/core/constants.js +1 -1
- package/dist/core/cookies/cookies.js +19 -19
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/fetch/fetch-state.js +12 -7
- package/dist/core/messages/runtime.js +1 -1
- package/dist/prefetch/index.js +2 -1
- package/package.json +5 -5
|
@@ -196,7 +196,7 @@ ${contentConfig.error.message}`
|
|
|
196
196
|
logger.info("Content config changed");
|
|
197
197
|
shouldClear = true;
|
|
198
198
|
}
|
|
199
|
-
if (previousAstroVersion && previousAstroVersion !== "7.1.
|
|
199
|
+
if (previousAstroVersion && previousAstroVersion !== "7.1.2") {
|
|
200
200
|
logger.info("Astro version changed");
|
|
201
201
|
shouldClear = true;
|
|
202
202
|
}
|
|
@@ -204,8 +204,8 @@ ${contentConfig.error.message}`
|
|
|
204
204
|
logger.info("Clearing content store");
|
|
205
205
|
this.#store.clearAll();
|
|
206
206
|
}
|
|
207
|
-
if ("7.1.
|
|
208
|
-
this.#store.metaStore().set("astro-version", "7.1.
|
|
207
|
+
if ("7.1.2") {
|
|
208
|
+
this.#store.metaStore().set("astro-version", "7.1.2");
|
|
209
209
|
}
|
|
210
210
|
if (currentConfigDigest) {
|
|
211
211
|
this.#store.metaStore().set("content-config-digest", currentConfigDigest);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, promises as fs } from "node:fs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import * as devalue from "devalue";
|
|
4
|
-
import {
|
|
4
|
+
import { forEach } from "neotraverse";
|
|
5
5
|
import { imageSrcToImportId, importIdToSymbolName } from "../assets/utils/resolveImports.js";
|
|
6
6
|
import { AstroError, AstroErrorData } from "../core/errors/index.js";
|
|
7
7
|
import { DATA_STORE_MANIFEST_FILE, IMAGE_IMPORT_PREFIX } from "./consts.js";
|
|
@@ -276,7 +276,7 @@ ${lines.join(",\n")}]);
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
const foundAssets = new Set(assetImports);
|
|
279
|
-
|
|
279
|
+
forEach(data, (_, val) => {
|
|
280
280
|
if (typeof val === "string" && val.startsWith(IMAGE_IMPORT_PREFIX)) {
|
|
281
281
|
const src = val.replace(IMAGE_IMPORT_PREFIX, "");
|
|
282
282
|
foundAssets.add(src);
|
package/dist/content/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { escape } from "html-escaper";
|
|
2
|
-
import {
|
|
2
|
+
import { forEach } from "neotraverse";
|
|
3
3
|
import * as z from "zod/v4";
|
|
4
4
|
import { createSvgComponent } from "../assets/runtime.js";
|
|
5
5
|
import { imageSrcToImportId } from "../assets/utils/resolveImports.js";
|
|
@@ -358,7 +358,7 @@ async function updateImageReferencesInBody(html, fileName) {
|
|
|
358
358
|
}
|
|
359
359
|
function updateImageReferencesInData(data, fileName, imageAssetMap) {
|
|
360
360
|
const copy = structuredClone(data);
|
|
361
|
-
|
|
361
|
+
forEach(copy, function(ctx, val) {
|
|
362
362
|
if (typeof val === "string" && val.startsWith(IMAGE_IMPORT_PREFIX)) {
|
|
363
363
|
const src = val.replace(IMAGE_IMPORT_PREFIX, "");
|
|
364
364
|
const id = imageSrcToImportId(src, fileName);
|
package/dist/core/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parseCookie, stringifySetCookie } from "cookie";
|
|
2
2
|
import { AstroError, AstroErrorData } from "../errors/index.js";
|
|
3
3
|
const DELETED_EXPIRATION = /* @__PURE__ */ new Date(0);
|
|
4
4
|
const DELETED_VALUE = "deleted";
|
|
@@ -42,20 +42,16 @@ class AstroCookies {
|
|
|
42
42
|
* @param options Options related to this deletion, such as the path of the cookie.
|
|
43
43
|
*/
|
|
44
44
|
delete(key, options) {
|
|
45
|
-
const {
|
|
46
|
-
// @ts-expect-error
|
|
47
|
-
maxAge: _ignoredMaxAge,
|
|
48
|
-
// @ts-expect-error
|
|
49
|
-
expires: _ignoredExpires,
|
|
50
|
-
...sanitizedOptions
|
|
51
|
-
} = options || {};
|
|
52
|
-
const serializeOptions = {
|
|
53
|
-
expires: DELETED_EXPIRATION,
|
|
54
|
-
...sanitizedOptions
|
|
55
|
-
};
|
|
56
45
|
this.#ensureOutgoingMap().set(key, [
|
|
57
46
|
DELETED_VALUE,
|
|
58
|
-
|
|
47
|
+
stringifySetCookie({
|
|
48
|
+
...options,
|
|
49
|
+
name: key,
|
|
50
|
+
value: DELETED_VALUE,
|
|
51
|
+
expires: DELETED_EXPIRATION,
|
|
52
|
+
// Unset `expires` to to ensure that `expires` takes precedence.
|
|
53
|
+
maxAge: void 0
|
|
54
|
+
}),
|
|
59
55
|
false
|
|
60
56
|
]);
|
|
61
57
|
}
|
|
@@ -133,13 +129,17 @@ class AstroCookies {
|
|
|
133
129
|
serializedValue = toStringValue;
|
|
134
130
|
}
|
|
135
131
|
}
|
|
136
|
-
const
|
|
137
|
-
if (options) {
|
|
138
|
-
Object.assign(serializeOptions, options);
|
|
139
|
-
}
|
|
132
|
+
const { encode, ...attributes } = options ?? {};
|
|
140
133
|
this.#ensureOutgoingMap().set(key, [
|
|
141
134
|
serializedValue,
|
|
142
|
-
|
|
135
|
+
stringifySetCookie(
|
|
136
|
+
{
|
|
137
|
+
...attributes,
|
|
138
|
+
name: key,
|
|
139
|
+
value: serializedValue
|
|
140
|
+
},
|
|
141
|
+
{ encode }
|
|
142
|
+
),
|
|
143
143
|
true
|
|
144
144
|
]);
|
|
145
145
|
if (this.#request[responseSentSymbol]) {
|
|
@@ -207,7 +207,7 @@ class AstroCookies {
|
|
|
207
207
|
if (!raw) {
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
|
-
this.#requestValues =
|
|
210
|
+
this.#requestValues = parseCookie(raw, { decode: identity });
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
export {
|
package/dist/core/dev/dev.js
CHANGED
|
@@ -26,7 +26,7 @@ async function dev(inlineConfig) {
|
|
|
26
26
|
await telemetry.record([]);
|
|
27
27
|
const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
|
|
28
28
|
const logger = restart.container.logger;
|
|
29
|
-
const currentVersion = "7.1.
|
|
29
|
+
const currentVersion = "7.1.2";
|
|
30
30
|
const isPrerelease = currentVersion.includes("-");
|
|
31
31
|
if (!isPrerelease) {
|
|
32
32
|
try {
|
|
@@ -167,13 +167,18 @@ class FetchState {
|
|
|
167
167
|
this.request = request;
|
|
168
168
|
options ??= getRenderOptions(request);
|
|
169
169
|
this.routeData = options?.routeData;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
const self = this;
|
|
171
|
+
this.renderOptions = {
|
|
172
|
+
...options ?? {
|
|
173
|
+
addCookieHeader: false,
|
|
174
|
+
clientAddress: void 0,
|
|
175
|
+
prerenderedErrorPageFetch: fetch,
|
|
176
|
+
routeData: void 0,
|
|
177
|
+
waitUntil: void 0
|
|
178
|
+
},
|
|
179
|
+
get locals() {
|
|
180
|
+
return self.locals;
|
|
181
|
+
}
|
|
177
182
|
};
|
|
178
183
|
this.componentInstance = void 0;
|
|
179
184
|
this.slots = void 0;
|
package/dist/prefetch/index.js
CHANGED
|
@@ -144,7 +144,8 @@ function prefetch(url, opts) {
|
|
|
144
144
|
for (const [key, value] of Object.entries(internalFetchHeaders)) {
|
|
145
145
|
headers.set(key, value);
|
|
146
146
|
}
|
|
147
|
-
fetch(url, { priority: "low", headers })
|
|
147
|
+
fetch(url, { priority: "low", headers }).catch(() => {
|
|
148
|
+
});
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
function canPrefetchUrl(url, ignoreSlowConnection) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
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",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"ci-info": "^4.4.0",
|
|
108
108
|
"clsx": "^2.1.1",
|
|
109
109
|
"common-ancestor-path": "^2.0.0",
|
|
110
|
-
"cookie": "^
|
|
110
|
+
"cookie": "^2.0.1",
|
|
111
111
|
"devalue": "^5.8.1",
|
|
112
112
|
"diff": "^8.0.3",
|
|
113
113
|
"dset": "^3.1.4",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"magic-string": "^0.30.21",
|
|
125
125
|
"magicast": "^0.5.2",
|
|
126
126
|
"mrmime": "^2.0.1",
|
|
127
|
-
"neotraverse": "^0.
|
|
127
|
+
"neotraverse": "^1.0.1",
|
|
128
128
|
"obug": "^2.1.1",
|
|
129
129
|
"p-limit": "^7.3.0",
|
|
130
130
|
"p-queue": "^9.1.0",
|
|
@@ -146,9 +146,9 @@
|
|
|
146
146
|
"xxhash-wasm": "^1.1.0",
|
|
147
147
|
"yargs-parser": "^22.0.0",
|
|
148
148
|
"zod": "^4.3.6",
|
|
149
|
+
"@astrojs/markdown-satteri": "0.3.4",
|
|
149
150
|
"@astrojs/internal-helpers": "0.10.1",
|
|
150
|
-
"@astrojs/telemetry": "3.3.3"
|
|
151
|
-
"@astrojs/markdown-satteri": "0.3.4"
|
|
151
|
+
"@astrojs/telemetry": "3.3.3"
|
|
152
152
|
},
|
|
153
153
|
"optionalDependencies": {
|
|
154
154
|
"sharp": "^0.34.0 || ^0.35.0"
|