unpkg-white-list 1.2.0 → 1.2.1

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 CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "unpkg-white-list",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
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",
@@ -1,15 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
8
-
9
- jobs:
10
- Job:
11
- name: Node.js
12
- uses: node-modules/github-actions/.github/workflows/node-test.yml@master
13
- with:
14
- os: 'ubuntu-latest'
15
- version: '22'
@@ -1,12 +0,0 @@
1
- name: Release
2
- on:
3
- push:
4
- branches: [ master ]
5
-
6
- jobs:
7
- release:
8
- name: Node.js
9
- uses: cnpm/github-actions/.github/workflows/node-release.yml@master
10
- secrets:
11
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
12
- GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
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
-