astro 2.0.13 → 2.0.14

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.
@@ -27,7 +27,7 @@ function vitePluginSSR(internals, adapter) {
27
27
  },
28
28
  load(id) {
29
29
  if (id === resolvedVirtualModuleId) {
30
- return `import * as _adapter from '${adapter.serverEntrypoint}';
30
+ return `import * as adapter from '${adapter.serverEntrypoint}';
31
31
  import * as _main from '${pagesVirtualModuleId}';
32
32
  import { deserializeManifest as _deserializeManifest } from 'astro/app';
33
33
  const _manifest = Object.assign(_deserializeManifest('${manifestReplace}'), {
@@ -36,7 +36,7 @@ const _manifest = Object.assign(_deserializeManifest('${manifestReplace}'), {
36
36
  });
37
37
  const _args = ${adapter.args ? JSON.stringify(adapter.args) : "undefined"};
38
38
  export * from '${pagesVirtualModuleId}';
39
- ${adapter.exports ? `const _exports = _adapter.createExports(_manifest, _args);
39
+ ${adapter.exports ? `const _exports = adapter.createExports(_manifest, _args);
40
40
  ${adapter.exports.map((name) => {
41
41
  if (name === "default") {
42
42
  return `const _default = _exports['default'];
@@ -46,12 +46,10 @@ export { _default as default };`;
46
46
  }
47
47
  }).join("\n")}
48
48
  ` : ""}
49
- export const adapter = _adapter
50
- ${adapter.name !== "@astrojs/deno" ? `
51
49
  const _start = 'start';
52
- if(_start in _adapter) {
53
- _adapter[_start](_manifest, _args);
54
- }` : ""}`;
50
+ if(_start in adapter) {
51
+ adapter[_start](_manifest, _args);
52
+ }`;
55
53
  }
56
54
  return void 0;
57
55
  },
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "2.0.13";
1
+ const ASTRO_VERSION = "2.0.14";
2
2
  const SUPPORTED_MARKDOWN_FILE_EXTENSIONS = [
3
3
  ".markdown",
4
4
  ".mdown",
@@ -31,7 +31,7 @@ async function dev(settings, options) {
31
31
  isRestart: options.isRestart
32
32
  })
33
33
  );
34
- const currentVersion = "2.0.13";
34
+ const currentVersion = "2.0.14";
35
35
  if (currentVersion.includes("-")) {
36
36
  warn(options.logging, null, msg.prerelease({ currentVersion }));
37
37
  }
@@ -47,7 +47,7 @@ function serverStart({
47
47
  base,
48
48
  isRestart = false
49
49
  }) {
50
- const version = "2.0.13";
50
+ const version = "2.0.14";
51
51
  const localPrefix = `${dim("\u2503")} Local `;
52
52
  const networkPrefix = `${dim("\u2503")} Network `;
53
53
  const emptyPrefix = " ".repeat(11);
@@ -233,7 +233,7 @@ function printHelp({
233
233
  message.push(
234
234
  linebreak(),
235
235
  ` ${bgGreen(black(` ${commandName} `))} ${green(
236
- `v${"2.0.13"}`
236
+ `v${"2.0.14"}`
237
237
  )} ${headline}`
238
238
  );
239
239
  }
@@ -12,7 +12,13 @@ const toIdent = (k) => k.trim().replace(/(?:(?!^)\b\w|\s+|[^\w]+)/g, (match, ind
12
12
  });
13
13
  const toAttributeString = (value, shouldEscape = true) => shouldEscape ? String(value).replace(/&/g, "&").replace(/"/g, """) : value;
14
14
  const kebab = (k) => k.toLowerCase() === k ? k : k.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
15
- const toStyleString = (obj) => Object.entries(obj).map(([k, v]) => `${kebab(k)}:${v}`).join(";");
15
+ const toStyleString = (obj) => Object.entries(obj).map(([k, v]) => {
16
+ if (k[0] !== "-" && k[1] !== "-")
17
+ return `${kebab(k)}:${v}`;
18
+ if (kebab(k) !== k)
19
+ return `${kebab(k)}:var(${k});${k}:${v}`;
20
+ return `${k}:${v}`;
21
+ }).join(";");
16
22
  function defineScriptVars(vars) {
17
23
  let output = "";
18
24
  for (const [key, value] of Object.entries(vars)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
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",
@@ -89,7 +89,7 @@
89
89
  "@astrojs/language-server": "^0.28.3",
90
90
  "@astrojs/markdown-remark": "^2.0.1",
91
91
  "@astrojs/telemetry": "^2.0.0",
92
- "@astrojs/webapi": "^2.0.0",
92
+ "@astrojs/webapi": "^2.0.1",
93
93
  "@babel/core": "^7.18.2",
94
94
  "@babel/generator": "^7.18.2",
95
95
  "@babel/parser": "^7.18.4",
@@ -133,7 +133,7 @@
133
133
  "typescript": "*",
134
134
  "unist-util-visit": "^4.1.0",
135
135
  "vfile": "^5.3.2",
136
- "vite": "^4.0.3",
136
+ "vite": "^4.1.2",
137
137
  "vitefu": "^0.2.4",
138
138
  "yargs-parser": "^21.0.1",
139
139
  "zod": "^3.17.3"
@@ -160,7 +160,7 @@
160
160
  "@types/send": "^0.17.1",
161
161
  "@types/server-destroy": "^1.0.1",
162
162
  "@types/unist": "^2.0.6",
163
- "astro-scripts": "0.0.10",
163
+ "astro-scripts": "0.0.11",
164
164
  "chai": "^4.3.6",
165
165
  "cheerio": "^1.0.0-rc.11",
166
166
  "eol": "^0.9.1",