unpkg-white-list 1.2.0 → 1.3.0
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/package.json +10 -2
- package/.github/workflows/nodejs.yml +0 -15
- package/.github/workflows/release.yml +0 -12
- package/CHANGELOG.md +0 -22
- package/test/index.js +0 -42
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unpkg-white-list",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "npmmirror 允许开启 unpkg 功能的白名单列表,避免 https://x.com/fengmk2/status/1791498406923215020 类似问题",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"files": [],
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "node --test",
|
|
8
9
|
"ci": "npm test",
|
|
@@ -170,9 +171,16 @@
|
|
|
170
171
|
"@phosphor",
|
|
171
172
|
"@plasmohq",
|
|
172
173
|
"@progress",
|
|
173
|
-
"@reach"
|
|
174
|
+
"@reach",
|
|
175
|
+
"@jiakun-zhao"
|
|
174
176
|
],
|
|
175
177
|
"allowPackages": {
|
|
178
|
+
"zhaojiakun.com": {
|
|
179
|
+
"version": "*"
|
|
180
|
+
},
|
|
181
|
+
"954.im": {
|
|
182
|
+
"version": "*"
|
|
183
|
+
},
|
|
176
184
|
"3d-force-graph": {
|
|
177
185
|
"version": "*"
|
|
178
186
|
},
|
package/CHANGELOG.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [1.2.0](https://github.com/cnpm/unpkg-white-list/compare/v1.1.0...v1.2.0) (2024-05-18)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
### Features
|
|
7
|
-
|
|
8
|
-
* support allow scopes ([#3](https://github.com/cnpm/unpkg-white-list/issues/3)) ([6e1b821](https://github.com/cnpm/unpkg-white-list/commit/6e1b821e63136ade3430fa3351a51eb07d249094))
|
|
9
|
-
|
|
10
|
-
## [1.1.0](https://github.com/cnpm/unpkg-white-list/compare/v1.0.0...v1.1.0) (2024-05-18)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### Features
|
|
14
|
-
|
|
15
|
-
* 新增小程序云 sdk ([#2](https://github.com/cnpm/unpkg-white-list/issues/2)) ([a5d8a05](https://github.com/cnpm/unpkg-white-list/commit/a5d8a05070b4f2c25c543569b4716153f5c2d20f))
|
|
16
|
-
|
|
17
|
-
## 1.0.0 (2024-05-18)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
* 初始化版本 ([#1](https://github.com/cnpm/unpkg-white-list/issues/1)) ([20477f5](https://github.com/cnpm/unpkg-white-list/commit/20477f5b1305c58859027d41c2887af7979d253f))
|
package/test/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const test = require('node:test');
|
|
2
|
-
const { strict: assert } = require('node:assert');
|
|
3
|
-
const { readFileSync } = require('node:fs');
|
|
4
|
-
const { dirname, join } = require('node:path');
|
|
5
|
-
const semverValidRange = require('semver/ranges/valid')
|
|
6
|
-
|
|
7
|
-
const pkgFile = join(dirname(__dirname), 'package.json');
|
|
8
|
-
|
|
9
|
-
test('should pkg.allowPackages work', (t) => {
|
|
10
|
-
const pkg = JSON.parse(readFileSync(pkgFile, 'utf-8'));
|
|
11
|
-
assert(pkg.allowPackages);
|
|
12
|
-
assert.equal(typeof pkg.allowPackages, 'object');
|
|
13
|
-
let packages = 0;
|
|
14
|
-
for (const name in pkg.allowPackages) {
|
|
15
|
-
packages++;
|
|
16
|
-
assert(name);
|
|
17
|
-
assert.equal(typeof name, 'string');
|
|
18
|
-
const config = pkg.allowPackages[name];
|
|
19
|
-
assert(config);
|
|
20
|
-
assert.equal(typeof config, 'object');
|
|
21
|
-
assert(config.version);
|
|
22
|
-
assert.equal(typeof config.version, 'string', `${name} version(${config.version}) type should be string`);
|
|
23
|
-
config.versionRange = semverValidRange(config.version);
|
|
24
|
-
assert(config.versionRange, `${name} version(${config.version}) should match semver range format`);
|
|
25
|
-
// console.log(' - %o => %j', name, config);
|
|
26
|
-
}
|
|
27
|
-
console.log('Total %d packages', packages);
|
|
28
|
-
assert(packages > 0);
|
|
29
|
-
|
|
30
|
-
assert(pkg.allowScopes);
|
|
31
|
-
assert.equal(typeof pkg.allowScopes, 'object');
|
|
32
|
-
let scopes = 0;
|
|
33
|
-
for (const name of pkg.allowScopes) {
|
|
34
|
-
scopes++;
|
|
35
|
-
assert(name);
|
|
36
|
-
assert.equal(typeof name, 'string');
|
|
37
|
-
assert.match(name, /^@.+/);
|
|
38
|
-
}
|
|
39
|
-
console.log('Total %d scopes', scopes);
|
|
40
|
-
assert(scopes > 0);
|
|
41
|
-
});
|
|
42
|
-
|