From bc1e5bb27fa5e294da84953e19567241363a2d52 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Mon, 19 Jul 2021 18:33:21 -0700 Subject: [PATCH] 0.17.3 - patch release --- examples/blog-multiple-authors/package.json | 2 +- examples/blog/package.json | 2 +- examples/docs/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/snowpack/package.json | 4 ++-- examples/starter/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- packages/astro-parser/tsconfig.json | 2 +- packages/astro/CHANGELOG.md | 6 ++++++ packages/astro/package.json | 2 +- packages/astro/src/compiler/index.ts | 6 +++--- packages/astro/tsconfig.json | 2 +- packages/create-astro/tsconfig.json | 2 +- packages/markdown-support/tsconfig.json | 2 +- scripts/cmd/build.js | 4 +++- www/package.json | 2 +- 24 files changed, 34 insertions(+), 26 deletions(-) diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index b239a9e4cd..01d5ea50db 100644 --- a/examples/blog-multiple-authors/package.json +++ b/examples/blog-multiple-authors/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/blog/package.json b/examples/blog/package.json index 365d640af2..2e58e37092 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/docs/package.json b/examples/docs/package.json index e2c1252d8b..360e39e548 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 89cb69a747..3c4b187960 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 77eb1e8757..0fac1c48f5 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index c443caf213..5f28588be3 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index e2e149a90a..21e1022b27 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 9bdacbc8b4..250f6e969c 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 89e0cb3930..8b02d024c8 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/snowpack/package.json b/examples/snowpack/package.json index d36abe5b5e..8e1140812e 100644 --- a/examples/snowpack/package.json +++ b/examples/snowpack/package.json @@ -11,7 +11,7 @@ "lint": "prettier --check \"src/**/*.js\"" }, "dependencies": { - "astro": "^0.17.2", + "astro": "^0.17.3", "date-fns": "^2.19.0", "deepmerge": "^4.2.2", "docsearch.js": "^2.6.3", @@ -25,7 +25,7 @@ "@11ty/eleventy-plugin-syntaxhighlight": "^3.0.4", "@contentful/rich-text-html-renderer": "^14.1.2", "@contentful/rich-text-types": "^14.1.2", - "astro": "^0.17.2", + "astro": "^0.17.3", "eleventy-plugin-nesting-toc": "^1.2.0", "luxon": "^1.25.0", "markdown-it": "^12.0.2", diff --git a/examples/starter/package.json b/examples/starter/package.json index e513bc5d9a..0aaa95094c 100644 --- a/examples/starter/package.json +++ b/examples/starter/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index d21922c47f..d586900155 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2", + "astro": "^0.17.3", "rehype-add-classes": "^1.0.0", "rehype-toc": "^3.0.2", "remark-autolink-headings": "^6.0.1", diff --git a/examples/with-markdown/package.json b/examples/with-markdown/package.json index cc925a7891..7ca771f337 100644 --- a/examples/with-markdown/package.json +++ b/examples/with-markdown/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index ad12877188..d42668666e 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -7,7 +7,7 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" }, "dependencies": { "nanostores": "^0.3.3" diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index b7a0ffd36a..5d7d06d4f7 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "tailwindcss": "^2.1.2", - "astro": "^0.17.2" + "astro": "^0.17.3" }, "snowpack": { "workspaceRoot": "../.." diff --git a/packages/astro-parser/tsconfig.json b/packages/astro-parser/tsconfig.json index 7456703e40..ce4208f31f 100644 --- a/packages/astro-parser/tsconfig.json +++ b/packages/astro-parser/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.base.json", "include": ["src"], "compilerOptions": { - "target": "ES2020", + "target": "ES2019", "module": "CommonJS", "outDir": "./dist" } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 63e19065f6..c80ba4cb32 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 0.17.3 + +### Patch Changes + +- Update compile target to better support Node v12. + ## 0.17.2 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 6d1e958922..58ab96a499 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "0.17.2", + "version": "0.17.3", "author": "Skypack", "license": "MIT", "type": "module", diff --git a/packages/astro/src/compiler/index.ts b/packages/astro/src/compiler/index.ts index 5f295e044e..22479130d6 100644 --- a/packages/astro/src/compiler/index.ts +++ b/packages/astro/src/compiler/index.ts @@ -135,9 +135,9 @@ async function __render(props, ...children) { const Astro = { props, site: new URL('/', ${JSON.stringify(site)}), - css: props[__astroInternal]?.css || [], - request: props[__astroInternal]?.request || {}, - isPage: props[__astroInternal]?.isPage || false + css: (props[__astroInternal] && props[__astroInternal].css) || [], + request: (props[__astroInternal] && props[__astroInternal].request) || {}, + isPage: (props[__astroInternal] && props[__astroInternal].isPage) || false, }; ${result.script} diff --git a/packages/astro/tsconfig.json b/packages/astro/tsconfig.json index 8f0cdf74d5..6b3c4ca88a 100644 --- a/packages/astro/tsconfig.json +++ b/packages/astro/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src", "index.d.ts"], "compilerOptions": { "allowJs": true, - "target": "ES2020", + "target": "ES2019", "module": "ES2020", "outDir": "./dist", "declarationDir": "./dist/types" diff --git a/packages/create-astro/tsconfig.json b/packages/create-astro/tsconfig.json index 8f0cdf74d5..6b3c4ca88a 100644 --- a/packages/create-astro/tsconfig.json +++ b/packages/create-astro/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src", "index.d.ts"], "compilerOptions": { "allowJs": true, - "target": "ES2020", + "target": "ES2019", "module": "ES2020", "outDir": "./dist", "declarationDir": "./dist/types" diff --git a/packages/markdown-support/tsconfig.json b/packages/markdown-support/tsconfig.json index 13d42008a7..c0d6d7154b 100644 --- a/packages/markdown-support/tsconfig.json +++ b/packages/markdown-support/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src"], "compilerOptions": { "allowJs": true, - "target": "ES2020", + "target": "ES2019", "module": "CommonJS", "outDir": "./dist" } diff --git a/scripts/cmd/build.js b/scripts/cmd/build.js index dd2b2fd826..cc62754f73 100644 --- a/scripts/cmd/build.js +++ b/scripts/cmd/build.js @@ -11,7 +11,9 @@ const defaultConfig = { minify: false, format: 'esm', platform: 'node', - target: 'node14', + // There's an issue with 'node12.20' compiling ESM to CJS + // so use 'node13.2' instead. V8 support should be similar. + target: 'node13.2', sourcemap: 'inline', sourcesContent: false, }; diff --git a/www/package.json b/www/package.json index 7b4ae0cb4b..5847cca0b9 100644 --- a/www/package.json +++ b/www/package.json @@ -7,6 +7,6 @@ "build": "astro build" }, "devDependencies": { - "astro": "^0.17.2" + "astro": "^0.17.3" } }