Skip to content

Commit

Permalink
feat: 初始化版本 (#1)
Browse files Browse the repository at this point in the history
默认带上正常的历史白名单

> Total 7794 packages

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced Continuous Integration (CI) workflow for automated testing
on pushes and pull requests.
  - Added a GitHub Actions workflow for streamlined releases.

- **Documentation**
- Enhanced README with badges, updated description, and contributor
information.
  - Updated license information.

- **Tests**
- Added a test script to validate package configurations in
`package.json`.

- **Chores**
  - Updated copyright statement in LICENSE.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
fengmk2 authored May 18, 2024
1 parent 70ef2aa commit 20477f5
Show file tree
Hide file tree
Showing 6 changed files with 23,510 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
Job:
name: Node.js
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
version: '22'
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release
on:
push:
branches: [ master ]

jobs:
release:
name: Node.js
uses: cnpm/github-actions/.github/workflows/node-release.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 cnpm
Copyright (c) 2024-present cnpm and other contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,41 @@
# unpkg-white-list
npmmirror 允许开启 unpkg 功能的白名单列表,避免 https://x.com/fengmk2/status/1791498406923215020 类似问题

[![NPM version](https://img.shields.io/npm/v/unpkg-white-list.svg?style=flat-square)](https://npmjs.org/package/unpkg-white-list)
[![CI](https://github.com/cnpm/unpkg-white-list/actions/workflows/node.yml/badge.svg)](https://github.com/cnpm/unpkg-white-list/actions/workflows/nodejs.yml)

[npmmirror.com](https://npmmirror.com) 允许开启 [unpkg 功能](https://www.yuque.com/egg/cnpm/files)的白名单列表,避免 https://x.com/fengmk2/status/1791498406923215020 类似问题

## 添加白名单方式

1、直接在线修改 [package.json](https://github.com/cnpm/unpkg-white-list/edit/master/package.json) 中的 `allowPackages` 字段,
添加你想开启 unpkg 文件同步的 npm 包名和版本号,全量同步版本号可以设置为 `*`

以同步 [urllib](https://npmmirror.com/package/urllib) 为示例,配置如下:

```json
"allowPackages": {
...
"urllib": {
"version": "*"
}
...
}
```

2、修改完成后提交一个 `Pull Request` 合并到 master 分支,等待 Review,合并后会自动发布,预计最长 5 分钟后会全网生效。

## License

[MIT](LICENSE)

<!-- GITCONTRIBUTOR_START -->

## 贡献者

|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|
| :---: |


[git-contributor 说明](https://github.com/xudafeng/git-contributor),自动生成时间:`Sat May 18 2024 09:02:24 GMT+0800`

<!-- GITCONTRIBUTOR_END -->
Loading

0 comments on commit 20477f5

Please sign in to comment.