Skip to content

Commit

Permalink
fixed dependency open to support Node 16
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Feb 26, 2024
1 parent 0991246 commit 2d91d22
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/lib/packages
/.env
/scripts/mock/demo/dist/
/packages/*/node_modules
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#loglevel=verbose
audit=false
logs-max=0
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* 2.3.4
- fixed dependency `open` to support Node 16

* 2.3.3
- updated dependencies

Expand Down
5 changes: 2 additions & 3 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const KSR = require('koa-static-resolver');
const Koa = require('koa');
const CG = require('console-grid');

const { program } = require('./packages/monocart-vendor.js');
const { program, open } = require('./packages/monocart-vendor.js');
const defaultOptions = require('./default/options.js');
const version = require('../package.json').version;

Expand Down Expand Up @@ -81,8 +81,7 @@ const showIpInfo = (protocol, port) => {
};

const openUrl = async (p) => {
const open = await import('open');
await open.default(p);
await open(p);
};

const createServer = (app, options) => {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@
"koa": "~2.15.0",
"koa-static-resolver": "~1.0.5",
"lz-utils": "~2.0.2",
"monocart-coverage-reports": "~2.5.3",
"monocart-formatter": "~2.3.1",
"nodemailer": "~6.9.9",
"open": "~10.0.3",
"monocart-coverage-reports": "~2.5.7",
"monocart-formatter": "~2.3.2",
"nodemailer": "~6.9.10",
"turbogrid": "~3.0.13"
},
"devDependencies": {
"@playwright/test": "^1.41.2",
"axios": "^1.6.7",
"dotenv": "^16.4.5",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-config-plus": "^1.0.6",
"eslint-plugin-html": "^8.0.0",
"eslint-plugin-vue": "^9.21.1",
"eslint-plugin-vue": "^9.22.0",
"open": "8.4.2",
"stylelint": "^15.11.0",
"stylelint-config-plus": "^1.0.4",
"vine-ui": "^3.1.13"
}
}
}
4 changes: 2 additions & 2 deletions packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
],
"license": "MIT",
"dependencies": {
"monocart-code-viewer": "~1.1.0",
"monocart-code-viewer": "~1.1.1",
"monocart-common": "~2.3.3",
"monocart-formatter": "~2.3.1",
"monocart-formatter": "~2.3.2",
"turbogrid": "~3.0.13"
},
"devDependencies": {}
Expand Down
4 changes: 3 additions & 1 deletion packages/vendor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { codeFrameColumns } from '@babel/code-frame';
import WebSocket, { WebSocketServer } from 'ws';
import sanitize from 'sanitize-filename';
import { program } from 'commander';
import open from 'open';

export {
StackUtils,
codeFrameColumns,
WebSocket,
WebSocketServer,
sanitize,
program
program,
open
};
7 changes: 7 additions & 0 deletions scripts/conf.cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ module.exports = {
enable: 'lint + build'
},

outdate: {
exclude: [
'stylelint',
'open'
]
},

build: {

vendors: ['common', 'app', 'network'],
Expand Down

0 comments on commit 2d91d22

Please sign in to comment.