Skip to content

Commit ad7eb60

Browse files
committed
Exempt existing packages from download forbidden word
1 parent 5459940 commit ad7eb60

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/.vscode/launch.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "attach",
10+
"name": "Attach",
11+
"port": 9229,
12+
"sourceMaps": true
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Launch Program",
18+
"program": "${file}"
19+
}
20+
]
21+
}

src/checks.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export async function checkPackageJson(
1717
}
1818
return;
1919
}
20-
if (/download/.test(dirPath)) {
20+
if (/download/.test(dirPath) &&
21+
dirPath !== "download" &&
22+
dirPath !== "downloadjs" &&
23+
dirPath !== "s3-download-stream") {
2124
// Since npm won't release their banned-words list, we'll have to manually add to this list.
2225
throw new Error(`${dirPath}: Contains the word 'download', which is banned by npm.`);
2326
}

0 commit comments

Comments
 (0)