Skip to content

Commit

Permalink
fix: only publish package.json on npm
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed May 18, 2024
1 parent 0fa922b commit 0b8882e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.2.0",
"description": "npmmirror 允许开启 unpkg 功能的白名单列表,避免 https://x.com/fengmk2/status/1791498406923215020 类似问题",
"main": "index.js",
"files": [],
"scripts": {
"test": "node --test",
"ci": "npm test",
Expand Down
2 changes: 2 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const pkgFile = join(dirname(__dirname), 'package.json');

test('should pkg.allowPackages work', (t) => {
const pkg = JSON.parse(readFileSync(pkgFile, 'utf-8'));
assert(pkg.files);
assert.equal(pkg.files.length, 0);
assert(pkg.allowPackages);
assert.equal(typeof pkg.allowPackages, 'object');
let packages = 0;
Expand Down

0 comments on commit 0b8882e

Please sign in to comment.