Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 初始化版本 #1

Merged
merged 2 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Comment on lines +3 to +4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Correct the Badge URL in README.md

The badge URL in the README.md file points to node.yml, but the actual workflow file is nodejs.yml. Please update the badge URL to match the correct workflow file name.

  • Current URL: https://github.com/cnpm/unpkg-white-list/actions/workflows/node.yml/badge.svg
  • Correct URL: https://github.com/cnpm/unpkg-white-list/actions/workflows/nodejs.yml/badge.svg
Analysis chain

Ensure the badge URL matches the workflow file name.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the badge URL matches the actual workflow file name.

# Test: Search for the workflow file. Expect: nodejs.yml
fd --type file --name 'nodejs.yml'

Length of output: 285



Script:

#!/bin/bash
# Description: Verify that the badge URL matches the actual workflow file name.

# Test: Search for the workflow file. Expect: nodejs.yml
fd 'nodejs.yml'

Length of output: 15



Script:

#!/bin/bash
# Description: Verify the actual workflow file name in the .github/workflows directory.

# Test: Search for all .yml files in the .github/workflows directory.
fd '.yml' .github/workflows

Length of output: 86


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using descriptive text for URLs to improve accessibility and SEO.

- [npmmirror.com](https://npmmirror.com)
+ [NPM Mirror](https://npmmirror.com)

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
[npmmirror.com](https://npmmirror.com) 允许开启 [unpkg 功能](https://www.yuque.com/egg/cnpm/files)的白名单列表,避免 https://x.com/fengmk2/status/1791498406923215020 类似问题
[NPM Mirror](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/>|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Images should have alternate text to improve accessibility.

- <img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/>
+ <img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;" alt="fengmk2"/>

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

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

| :---: |


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove multiple consecutive blank lines to maintain a clean and professional appearance in the README file.

- 
- 

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change

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

<!-- GITCONTRIBUTOR_END -->
Loading
Loading