as-test 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/README.md +12 -12
- package/as-test.config.json +1 -1
- package/assembly/__tests__/array.spec.ts +3 -3
- package/assembly/src/expectation.ts +29 -16
- package/assembly/src/suite.ts +2 -0
- package/assembly/src/tests.ts +1 -0
- package/bin/build.js +65 -77
- package/bin/index.js +130 -160
- package/bin/init.js +96 -109
- package/bin/reporter.js +1 -1
- package/bin/run.js +210 -236
- package/bin/types.js +25 -25
- package/bin/util.js +35 -42
- package/cli/run.ts +13 -15
- package/cli/tsconfig.json +2 -1
- package/package.json +12 -9
- package/transform/lib/builder.js +1361 -0
- package/transform/lib/builder.js.map +1 -0
- package/transform/lib/coverage.js +6 -6
- package/transform/lib/coverage.js.map +1 -1
- package/transform/lib/index.js +1 -1
- package/transform/lib/index.js.map +1 -1
- package/transform/lib/linker.js +19 -0
- package/transform/lib/linker.js.map +1 -0
- package/transform/lib/mock.js +9 -9
- package/transform/lib/mock.js.map +1 -1
- package/transform/lib/range.js +13 -0
- package/transform/lib/range.js.map +1 -0
- package/transform/lib/types.js +26 -0
- package/transform/lib/types.js.map +1 -0
- package/transform/lib/util.js +47 -0
- package/transform/lib/util.js.map +1 -0
- package/transform/lib/visitor.js +532 -0
- package/transform/lib/visitor.js.map +1 -0
- package/transform/src/builder.ts +1474 -0
- package/transform/src/coverage.ts +6 -7
- package/transform/src/index.ts +1 -2
- package/transform/src/linker.ts +41 -0
- package/transform/src/mock.ts +9 -10
- package/transform/src/range.ts +12 -0
- package/transform/src/types.ts +35 -0
- package/transform/src/util.ts +81 -0
- package/transform/src/visitor.ts +744 -0
- package/.trunk/configs/.markdownlint.yaml +0 -2
- package/.trunk/configs/.yamllint.yaml +0 -7
- package/.trunk/trunk.yaml +0 -34
- package/bin/about.js +0 -135
- package/bin/package.json +0 -3
package/bin/index.js
CHANGED
|
@@ -9,168 +9,138 @@ const args = [];
|
|
|
9
9
|
const COMMANDS = ["run", "build", "test", "init"];
|
|
10
10
|
const version = "0.3.5";
|
|
11
11
|
for (const arg of _args) {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
if (arg.startsWith("-"))
|
|
13
|
+
flags.push(arg);
|
|
14
|
+
else
|
|
15
|
+
args.push(arg);
|
|
14
16
|
}
|
|
15
17
|
if (!args.length) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
18
|
+
if (flags.includes("--version") || flags.includes("-v")) {
|
|
19
|
+
console.log("as-test v" + version.toString());
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
info();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else if (COMMANDS.includes(args[0])) {
|
|
26
|
+
const command = args.shift();
|
|
27
|
+
if (command === "build") {
|
|
28
|
+
build();
|
|
29
|
+
}
|
|
30
|
+
else if (command === "run") {
|
|
31
|
+
run();
|
|
32
|
+
}
|
|
33
|
+
else if (command === "test") {
|
|
34
|
+
build().then(() => {
|
|
35
|
+
run();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
else if (command === "init") {
|
|
39
|
+
init(args);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
console.log(chalk.bgRed(" ERROR ") +
|
|
44
|
+
chalk.dim(":") +
|
|
45
|
+
" " +
|
|
46
|
+
chalk.bold("Unknown command: ") +
|
|
47
|
+
args[0]);
|
|
42
48
|
}
|
|
43
49
|
function info() {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
chalk.strikethrough.dim("use") +
|
|
141
|
-
" " +
|
|
142
|
-
chalk.strikethrough.bold.blue("--list") +
|
|
143
|
-
" " +
|
|
144
|
-
"List supported runtimes",
|
|
145
|
-
);
|
|
146
|
-
console.log(
|
|
147
|
-
" " +
|
|
148
|
-
chalk.strikethrough.dim("reporter") +
|
|
149
|
-
" " +
|
|
150
|
-
chalk.strikethrough.bold.blue("--list") +
|
|
151
|
-
" " +
|
|
152
|
-
"List supported reporters",
|
|
153
|
-
);
|
|
154
|
-
console.log(
|
|
155
|
-
" " +
|
|
156
|
-
chalk.strikethrough.dim("<command>") +
|
|
157
|
-
" " +
|
|
158
|
-
chalk.strikethrough.bold.blue("--help") +
|
|
159
|
-
" " +
|
|
160
|
-
"Print info about command" +
|
|
161
|
-
"\n",
|
|
162
|
-
);
|
|
163
|
-
console.log(
|
|
164
|
-
chalk.dim(
|
|
165
|
-
"If your using this, consider dropping a star, it would help a lot!",
|
|
166
|
-
) + "\n",
|
|
167
|
-
);
|
|
168
|
-
console.log(
|
|
169
|
-
"View the repo: " +
|
|
170
|
-
chalk.magenta("https://github.com/JairusSW/as-test"),
|
|
171
|
-
);
|
|
172
|
-
console.log(
|
|
173
|
-
"View the docs: " +
|
|
174
|
-
chalk.strikethrough.blue("https://docs.jairus.dev/as-test"),
|
|
175
|
-
);
|
|
50
|
+
console.log(chalk.bold.blueBright("as-test") +
|
|
51
|
+
" is a testing framework for AssemblyScript. " +
|
|
52
|
+
chalk.dim("(v" + version + ")") +
|
|
53
|
+
"\n");
|
|
54
|
+
console.log(chalk.bold("Usage: as-test") +
|
|
55
|
+
" " +
|
|
56
|
+
chalk.dim("<command>") +
|
|
57
|
+
" " +
|
|
58
|
+
chalk.bold.blueBright("[...flags]") +
|
|
59
|
+
" " +
|
|
60
|
+
chalk.bold("[...args]") +
|
|
61
|
+
" " +
|
|
62
|
+
chalk.dim("(alias: ast)") +
|
|
63
|
+
"\n");
|
|
64
|
+
console.log(chalk.bold("Commands:"));
|
|
65
|
+
console.log(" " +
|
|
66
|
+
chalk.bold.blueBright("run") +
|
|
67
|
+
" " +
|
|
68
|
+
chalk.dim("<my-test.spec.ts>") +
|
|
69
|
+
" " +
|
|
70
|
+
"Run unit tests with selected runtime");
|
|
71
|
+
console.log(" " +
|
|
72
|
+
chalk.bold.blueBright("build") +
|
|
73
|
+
" " +
|
|
74
|
+
chalk.dim("<my-test.spec.ts>") +
|
|
75
|
+
" " +
|
|
76
|
+
"Build unit tests and compile");
|
|
77
|
+
console.log(" " +
|
|
78
|
+
chalk.bold.blueBright("test") +
|
|
79
|
+
" " +
|
|
80
|
+
chalk.dim("<my-test.spec.ts>") +
|
|
81
|
+
" " +
|
|
82
|
+
"Build and run unit tests with selected runtime" +
|
|
83
|
+
"\n");
|
|
84
|
+
console.log(" " +
|
|
85
|
+
chalk.bold.magentaBright("init") +
|
|
86
|
+
" " +
|
|
87
|
+
chalk.strikethrough.dim("") +
|
|
88
|
+
" " +
|
|
89
|
+
"Initialize an empty testing template");
|
|
90
|
+
console.log(" " +
|
|
91
|
+
chalk.strikethrough.bold.magentaBright("config") +
|
|
92
|
+
" " +
|
|
93
|
+
chalk.strikethrough.dim("as-test.config.json") +
|
|
94
|
+
" " +
|
|
95
|
+
"Specify the configuration file");
|
|
96
|
+
console.log(" " +
|
|
97
|
+
chalk.strikethrough.bold.magentaBright("reporter") +
|
|
98
|
+
" " +
|
|
99
|
+
chalk.strikethrough.dim("<tap>") +
|
|
100
|
+
" " +
|
|
101
|
+
"Specify the test reporter to use");
|
|
102
|
+
console.log(" " +
|
|
103
|
+
chalk.strikethrough.bold.magentaBright("use") +
|
|
104
|
+
" " +
|
|
105
|
+
chalk.strikethrough.dim("wasmtime") +
|
|
106
|
+
" " +
|
|
107
|
+
"Specify the runtime to use" +
|
|
108
|
+
"\n");
|
|
109
|
+
console.log(chalk.bold("Flags:"));
|
|
110
|
+
console.log(" " +
|
|
111
|
+
chalk.strikethrough.dim("run") +
|
|
112
|
+
" " +
|
|
113
|
+
chalk.strikethrough.bold.blue("--coverage") +
|
|
114
|
+
" " +
|
|
115
|
+
"Use code coverage");
|
|
116
|
+
console.log(" " +
|
|
117
|
+
chalk.strikethrough.dim("run") +
|
|
118
|
+
" " +
|
|
119
|
+
chalk.strikethrough.bold.blue("--snapshot") +
|
|
120
|
+
" " +
|
|
121
|
+
"Take a snapshot of the tests");
|
|
122
|
+
console.log(" " +
|
|
123
|
+
chalk.strikethrough.dim("use") +
|
|
124
|
+
" " +
|
|
125
|
+
chalk.strikethrough.bold.blue("--list") +
|
|
126
|
+
" " +
|
|
127
|
+
"List supported runtimes");
|
|
128
|
+
console.log(" " +
|
|
129
|
+
chalk.strikethrough.dim("reporter") +
|
|
130
|
+
" " +
|
|
131
|
+
chalk.strikethrough.bold.blue("--list") +
|
|
132
|
+
" " +
|
|
133
|
+
"List supported reporters");
|
|
134
|
+
console.log(" " +
|
|
135
|
+
chalk.strikethrough.dim("<command>") +
|
|
136
|
+
" " +
|
|
137
|
+
chalk.strikethrough.bold.blue("--help") +
|
|
138
|
+
" " +
|
|
139
|
+
"Print info about command" +
|
|
140
|
+
"\n");
|
|
141
|
+
console.log(chalk.dim("If your using this, consider dropping a star, it would help a lot!") + "\n");
|
|
142
|
+
console.log("View the repo: " +
|
|
143
|
+
chalk.magenta("https://github.com/JairusSW/as-test"));
|
|
144
|
+
console.log("View the docs: " +
|
|
145
|
+
chalk.strikethrough.blue("https://docs.jairus.dev/as-test"));
|
|
176
146
|
}
|
package/bin/init.js
CHANGED
|
@@ -5,27 +5,24 @@ import { createInterface } from "readline";
|
|
|
5
5
|
import { loadConfig } from "./util.js";
|
|
6
6
|
const TARGETS = ["wasi", "bindings"];
|
|
7
7
|
export async function init(args) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
);
|
|
27
|
-
console.log(
|
|
28
|
-
chalk.dim(` ├── 📂 assembly/
|
|
8
|
+
const rl = createInterface({
|
|
9
|
+
input: process.stdin,
|
|
10
|
+
output: process.stdout,
|
|
11
|
+
});
|
|
12
|
+
console.log(chalk.bold("as-test init v0.3.5") + "\n");
|
|
13
|
+
console.log(chalk.dim("[1/3]") + " select a target [wasi/bindings]");
|
|
14
|
+
const target = await ask(chalk.dim(" -> "), rl);
|
|
15
|
+
if (!TARGETS.includes(target)) {
|
|
16
|
+
console.log("Invalid target " + target + ". Exiting.");
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
process.stdout.write(`\u001B[1A`);
|
|
20
|
+
process.stdout.write("\x1B[2K");
|
|
21
|
+
process.stdout.write("\x1B[0G");
|
|
22
|
+
console.log("\n" +
|
|
23
|
+
chalk.dim("[2/3]") +
|
|
24
|
+
" attempting to create the following files. Continue? [y/n]\n");
|
|
25
|
+
console.log(chalk.dim(` ├── 📂 assembly/
|
|
29
26
|
│ └── 📂 __tests__/
|
|
30
27
|
│ └── 🧪 example.spec.ts
|
|
31
28
|
├── 📂 build/
|
|
@@ -33,27 +30,25 @@ export async function init(args) {
|
|
|
33
30
|
├── 📂 tests/
|
|
34
31
|
│ └── 📃 as-test.run.js
|
|
35
32
|
├── ⚙️ as-test.config.json
|
|
36
|
-
└── ⚙️ package.json\n`)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"./assembly/__tests__/example.spec.ts",
|
|
56
|
-
`import {
|
|
33
|
+
└── ⚙️ package.json\n`));
|
|
34
|
+
const cont = (await ask(chalk.dim(" -> "), rl)).toLowerCase().trim();
|
|
35
|
+
if (cont == "n" || cont == "no") {
|
|
36
|
+
console.log("Exiting.");
|
|
37
|
+
process.exit(0);
|
|
38
|
+
}
|
|
39
|
+
let config = loadConfig(path.join(process.cwd(), "./as-test.config.json"));
|
|
40
|
+
if (target == "wasi" && config.buildOptions.target != "wasi") {
|
|
41
|
+
config.buildOptions.target = "wasi";
|
|
42
|
+
config.runOptions.runtime.name = "wasmtime";
|
|
43
|
+
config.runOptions.runtime.run = "wasmtime <file>";
|
|
44
|
+
}
|
|
45
|
+
else if (target == "bindings" && config.buildOptions.target != "bindings") {
|
|
46
|
+
config.buildOptions.target = "bindings";
|
|
47
|
+
config.runOptions.runtime.name = "node";
|
|
48
|
+
config.runOptions.runtime.run = "node ./tests/<name>.run.js";
|
|
49
|
+
}
|
|
50
|
+
writeFile("./as-test.config.json", JSON.stringify(config, null, 2));
|
|
51
|
+
writeFile("./assembly/__tests__/example.spec.ts", `import {
|
|
57
52
|
describe,
|
|
58
53
|
expect,
|
|
59
54
|
test,
|
|
@@ -143,85 +138,77 @@ run();
|
|
|
143
138
|
function sleep(ms: i64): void {
|
|
144
139
|
const target = Date.now() + ms;
|
|
145
140
|
while (target > Date.now()) { }
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
writeFile(
|
|
152
|
-
"./tests/example.run.js",
|
|
153
|
-
`import { readFileSync } from "fs";
|
|
141
|
+
}`);
|
|
142
|
+
writeDir("./build/");
|
|
143
|
+
writeDir("./logs/");
|
|
144
|
+
if (target == "bindings") {
|
|
145
|
+
writeFile("./tests/example.run.js", `import { readFileSync } from "fs";
|
|
154
146
|
import { instantiate } from "../build/example.spec.js";
|
|
155
147
|
|
|
156
148
|
const binary = readFileSync("./build/example.spec.wasm");
|
|
157
149
|
const module = new WebAssembly.Module(binary);
|
|
158
150
|
|
|
159
|
-
const exports = instantiate(module, {})
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
pkg
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
pkg
|
|
186
|
-
|
|
187
|
-
pkg["type"] = "module";
|
|
188
|
-
}
|
|
189
|
-
writeFileSync(PKG_PATH, JSON.stringify(pkg, null, 2));
|
|
190
|
-
process.exit(0);
|
|
151
|
+
const exports = instantiate(module, {});`);
|
|
152
|
+
}
|
|
153
|
+
const PKG_PATH = path.join(process.cwd(), "./package.json");
|
|
154
|
+
if (!hasDep(PKG_PATH, "assemblyscript")) {
|
|
155
|
+
console.log(chalk.dim("AssemblyScript is not included in dependencies.\nInstall it with " +
|
|
156
|
+
(process.env.npm_config_user_agent == "yarn"
|
|
157
|
+
? process.env.npm_config_user_agent + " add assemblyscript"
|
|
158
|
+
: process.env.npm_config_user_agent + " install assemblyscript")));
|
|
159
|
+
}
|
|
160
|
+
const pkg = JSON.parse(existsSync(PKG_PATH) ? readFileSync(PKG_PATH).toString() : "{}");
|
|
161
|
+
if (!pkg["scripts"])
|
|
162
|
+
pkg["scripts"] = {};
|
|
163
|
+
if (!pkg.scripts["pretest"]) {
|
|
164
|
+
pkg.scripts["pretest"] = "as-test build";
|
|
165
|
+
pkg.scripts["test"] = "as-test run";
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
pkg.scripts["test"] = "as-test test";
|
|
169
|
+
}
|
|
170
|
+
if (!pkg["devDependencies"])
|
|
171
|
+
pkg["devDependencies"] = {};
|
|
172
|
+
if (!pkg["devDependencies"]["as-test"])
|
|
173
|
+
pkg["devDependencies"]["as-test"] = "^0.3.5";
|
|
174
|
+
if (target == "bindings") {
|
|
175
|
+
pkg["type"] = "module";
|
|
176
|
+
}
|
|
177
|
+
writeFileSync(PKG_PATH, JSON.stringify(pkg, null, 2));
|
|
178
|
+
process.exit(0);
|
|
191
179
|
}
|
|
192
180
|
function ask(question, face) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
181
|
+
return new Promise((res, _) => {
|
|
182
|
+
face.question(question, (answer) => {
|
|
183
|
+
res(answer);
|
|
184
|
+
});
|
|
196
185
|
});
|
|
197
|
-
});
|
|
198
186
|
}
|
|
199
187
|
function writeFile(pth, data) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
188
|
+
const fmtPath = path.join(process.cwd(), pth);
|
|
189
|
+
if (existsSync(fmtPath))
|
|
190
|
+
return;
|
|
191
|
+
if (!existsSync(path.dirname(fmtPath)))
|
|
192
|
+
mkdirSync(path.dirname(fmtPath), { recursive: true });
|
|
193
|
+
writeFileSync(fmtPath, data);
|
|
205
194
|
}
|
|
206
195
|
function writeDir(pth) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
196
|
+
const fmtPath = path.join(process.cwd(), pth);
|
|
197
|
+
if (existsSync(fmtPath))
|
|
198
|
+
return;
|
|
199
|
+
mkdirSync(fmtPath);
|
|
210
200
|
}
|
|
211
201
|
function hasDep(PKG_PATH, dep) {
|
|
212
|
-
|
|
213
|
-
existsSync(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
return true;
|
|
202
|
+
const pkg = JSON.parse(existsSync(PKG_PATH) ? readFileSync(PKG_PATH).toString() : "{}");
|
|
203
|
+
if (existsSync(path.join(process.cwd(), "./node_modules/", dep)))
|
|
204
|
+
return true;
|
|
205
|
+
if (pkg.dependencies &&
|
|
206
|
+
!Object.keys(pkg.dependencies).includes(dep) &&
|
|
207
|
+
pkg.devDependencies &&
|
|
208
|
+
!Object.keys(pkg.devDependencies).includes(dep) &&
|
|
209
|
+
pkg.peerDependencies &&
|
|
210
|
+
!Object.keys(pkg.peerDependencies).includes(dep)) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
return true;
|
|
227
214
|
}
|
package/bin/reporter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function report() {}
|
|
1
|
+
export function report() { }
|