From 91cc7841612f3c0bc8e7f1ab41e82b88b5d06634 Mon Sep 17 00:00:00 2001 From: onlyhom Date: Mon, 5 Sep 2022 16:44:23 +0800 Subject: [PATCH] chore: upgrade node version to v18 in build environment --- .github/workflows/build-release.yml | 2 +- .github/workflows/gh-pages.yml | 2 +- .npmignore | 6 ++++++ scripts/add-banner.mjs | 2 +- scripts/build-html.mjs | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index d359093..0858194 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -20,7 +20,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@v3.4.1 with: - node-version: 14 + node-version: 18 - name: Setup pnpm uses: pnpm/action-setup@v2.2.2 with: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1464612..a0ece96 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -20,7 +20,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@v3.4.1 with: - node-version: 14 + node-version: 18 - name: Setup pnpm uses: pnpm/action-setup@v2.2.2 with: diff --git a/.npmignore b/.npmignore index 41aa084..534553e 100644 --- a/.npmignore +++ b/.npmignore @@ -14,6 +14,12 @@ scripts .jshintrc .eslintrc* .github +.husky +.eslintignore +.lintstagedrc. +.prettierignore +.prettierrc +commitlint.config.js #editor settings .vscode diff --git a/scripts/add-banner.mjs b/scripts/add-banner.mjs index 6adf872..c79b4d1 100644 --- a/scripts/add-banner.mjs +++ b/scripts/add-banner.mjs @@ -1,7 +1,7 @@ import { resolve } from "path"; import { promises as fs } from "fs"; import { fileURLToPath } from "url"; -import packageJson from "../package.json"; +import packageJson from "../package.json" assert { type: "json" }; // Import assertions became required after v17.5.0 (related to this change:github.com/nodejs/node/pull/40785). import glob from "fast-glob"; const __dirname = fileURLToPath(import.meta.url); diff --git a/scripts/build-html.mjs b/scripts/build-html.mjs index 9313e9d..d989bcd 100644 --- a/scripts/build-html.mjs +++ b/scripts/build-html.mjs @@ -1,7 +1,7 @@ import { resolve } from "path"; import { promises as fs } from "fs"; import { fileURLToPath } from "url"; -import packageJson from "../package.json"; +import packageJson from "../package.json" assert { type: "json" }; // Import assertions became required after v17.5.0 (related to this change:github.com/nodejs/node/pull/40785). import glob from "fast-glob"; const __dirname = fileURLToPath(import.meta.url);