Skip to content

Commit 44d440b

Browse files
committed
⬆️ upgrade
1 parent f23a6ab commit 44d440b

File tree

3 files changed

+1405
-1911
lines changed

3 files changed

+1405
-1911
lines changed

index.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
'use strict';
22

3-
const output = {};
4-
5-
function defineProperty(key, from, to = output) {
3+
function defineProperty(key, from, to = exports) {
64
if (to[key]) throw new Error(`"${key}" already exsits!`);
75
// lazy
86
Object.defineProperty(to, key, {
@@ -78,15 +76,13 @@ Object.keys(thirdParty).forEach(key => {
7876

7977
const alias = {
8078
assert: () => {
81-
return output.logger.assert.bind(output.logger);
79+
return exports.logger.assert.bind(exports.logger);
8280
},
8381
};
8482

8583
Object.keys(alias).forEach(key => {
86-
if (output[key]) throw new Error(`"${key}" already exsits!`);
87-
Object.defineProperty(output, key, {
84+
if (exports[key]) throw new Error(`"${key}" already exsits!`);
85+
Object.defineProperty(exports, key, {
8886
get: alias[key],
8987
});
9088
});
91-
92-
module.exports = output;

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "0.1.25",
44
"description": "[Shared] shared utilities for micro-app.",
55
"main": "index.js",
6-
"typings": "index.d.ts",
76
"scripts": {
87
"prepublishOnly": "npm run test",
98
"lint": "eslint .",
@@ -74,7 +73,7 @@
7473
"inquirer": "^7.3.3",
7574
"is-docker": "^2.2.1",
7675
"is-glob": "^4.0.1",
77-
"lodash": "^4.17.15",
76+
"lodash": "^4.17.21",
7877
"lru-cache": "^5.1.1",
7978
"multimatch": "^4.0.0",
8079
"npm-package-arg": "^6.1.1",
@@ -83,7 +82,7 @@
8382
"ora": "^3.4.0",
8483
"parse-json": "^5.2.0",
8584
"semver": "^6.3.0",
86-
"semver-regex": "^3.1.2",
85+
"semver-regex": "^3.1.3",
8786
"shelljs": "^0.8.4",
8887
"signal-exit": "^3.0.3",
8988
"stream-to-string": "^1.2.0",

0 commit comments

Comments
 (0)