diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index b239a9e4c..01d5ea50d 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 365d640af..2e58e3709 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 e2c1252d8..360e39e54 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 89cb69a74..3c4b18796 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 77eb1e875..0fac1c48f 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 c443caf21..5f28588be 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 e2e149a90..21e1022b2 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 9bdacbc8b..250f6e969 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 89e0cb393..8b02d024c 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 d36abe5b5..8e1140812 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 e513bc5d9..0aaa95094 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 d21922c47..d58690015 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 cc925a789..7ca771f33 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 ad1287718..d42668666 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 b7a0ffd36..5d7d06d4f 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 7456703e4..ce4208f31 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 63e19065f..c80ba4cb3 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 6d1e95892..58ab96a49 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 5f295e044..22479130d 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 8f0cdf74d..6b3c4ca88 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 8f0cdf74d..6b3c4ca88 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 13d42008a..c0d6d7154 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 dd2b2fd82..cc62754f7 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 7b4ae0cb4..5847cca0b 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" } }