chore: update node engine version 18 (#9348)

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
ozaki 2023-09-28 16:45:25 +02:00 committed by GitHub
parent a178654446
commit bde9cfd84d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 54 additions and 64 deletions

View file

@ -10,16 +10,6 @@
import fs from 'fs-extra';
import shell from 'shelljs';
const NODE_MAJOR_VERSION = parseInt(
/** @type {string} */ (process.versions.node.split('.')[0]),
10,
);
if (NODE_MAJOR_VERSION < 16) {
throw new Error(
'This generateExamples Docusaurus script requires at least Node.js 16 and npm 7. See why here: https://github.com/facebook/docusaurus/pull/5722#issuecomment-948847891',
);
}
/**
* Generate one example per init template
* We use those generated examples as CodeSandbox projects
@ -78,9 +68,9 @@ async function generateTemplateExample(template) {
hardReloadOnChange: true,
view: 'browser',
template: 'docusaurus',
node: '16',
node: '18',
container: {
node: '16',
node: '18',
},
};
await fs.writeFile(