Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Fix: fs/promises module not found in node12 #186

Merged
merged 3 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/basic-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ice/app": "file:../../packages/ice",
"@ice/plugin-auth": "^1.0.0",
"@ice/runtime": "^1.0.0",
"@ice/app": "workspace:*",
"@ice/plugin-auth": "workspace:*",
"@ice/runtime": "workspace:*",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand All @@ -20,6 +20,7 @@
"@types/react-dom": "^18.0.2",
"browserslist": "^4.19.3",
"regenerator-runtime": "^0.13.9",
"speed-measure-webpack-plugin": "^1.5.0"
"speed-measure-webpack-plugin": "^1.5.0",
"webpack": "^5.72.0"
}
}
9 changes: 5 additions & 4 deletions examples/csr-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ice/app": "file:../../packages/ice",
"@ice/plugin-auth": "^1.0.0",
"@ice/runtime": "^1.0.0",
"@ice/app": "workspace:*",
"@ice/plugin-auth": "workspace:*",
"@ice/runtime": "workspace:*",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand All @@ -20,6 +20,7 @@
"@types/react-dom": "^18.0.0",
"browserslist": "^4.19.3",
"regenerator-runtime": "^0.13.9",
"speed-measure-webpack-plugin": "^1.5.0"
"speed-measure-webpack-plugin": "^1.5.0",
"webpack": "^5.72.0"
}
}
4 changes: 2 additions & 2 deletions examples/routes-generate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ice/app": "file:../../packages/ice",
"@ice/runtime": "^1.0.0",
"@ice/app": "workspace:*",
"@ice/runtime": "workspace:*",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/single-route/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"author": "",
"license": "MIT",
"dependencies": {
"@ice/app": "file:../../packages/ice",
"@ice/runtime": "^1.0.0",
"@ice/app": "workspace:*",
"@ice/runtime": "workspace:*",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/bundles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"css-minimizer-webpack-plugin": "3.4.1",
"cssnano": "^5.1.7",
"es-module-lexer": "0.10.5",
"eslint": "^8.14.0",
"eslint-webpack-plugin": "3.1.1",
"fork-ts-checker-webpack-plugin": "7.2.6",
"fs-extra": "^10.0.0",
Expand All @@ -45,6 +46,7 @@
"webpack": "5.72.0",
"webpack-bundle-analyzer": "4.5.0",
"webpack-dev-server": "4.8.1",
"webpack-sources": "3.2.3"
"webpack-sources": "3.2.3",
"typescript": "^4.6.4"
}
}
4 changes: 2 additions & 2 deletions packages/ice/bin/ice-cli.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
import fs from 'fs/promises';
import path from 'path';
import { fileURLToPath } from 'url';
import fse from 'fs-extra';
import { program } from 'commander';
import detectPort from 'detect-port';
// hijack webpack before import other modules
Expand All @@ -12,7 +12,7 @@ import checkNodeVersion from './checkNodeVersion.mjs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));

(async function () {
const icePackageInfo = JSON.parse(await fs.readFile(path.join(__dirname, '../package.json'), 'utf-8'));
const icePackageInfo = await fse.readJSON(path.join(__dirname, '../package.json'));
checkNodeVersion(icePackageInfo.engines.node, icePackageInfo.name);
process.env.__ICE_VERSION__ = icePackageInfo.version;
const cwd = process.cwd();
Expand Down
1 change: 1 addition & 0 deletions packages/ice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@types/sass": "^1.43.1",
"@types/temp": "^0.9.1",
"chokidar": "^3.5.3",
"react": "^18.0.0",
"webpack": "^5.72.0",
"unplugin": "^0.3.2"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"devDependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"regenerator-runtime": "^0.13.9"
},
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
"@ice/runtime": "^1.0.0",
"build-scripts": "2.0.0-17",
"esbuild": "^0.14.23",
"eslint": "^8.14.0",
"eslint-webpack-plugin": "3.1.1",
"fork-ts-checker-webpack-plugin": "7.2.6",
"react": "^18.0.0",
"terser": "^5.12.1",
"unplugin": "^0.3.2",
"webpack": "^5.72.0",
"webpack-dev-server": "^4.7.4"
"webpack-dev-server": "^4.7.4",
"typescript": "^4.6.4"
}
}
Loading