Skip to content

Commit f366200

Browse files
authored
4.x (#640)
* 升级项目基础依赖,优化构建流程、开发体验 (#590) * merge qiniu/master * 细节调整 * 将大量私有的方法标记为 deprecated & 更新文档 * 调试 workflow actions * 为 upload 的上传结果添加泛型 * 基本完成 * 移除一些非必要的文件及改动 * build 不应该使用 parallel * 添加 vscode workspace 配置文件 * update dev-test package.json * 针对 iife 输出 umd 格式 * update * just move files * init common package * 公共逻辑基本完成 * 微信 SDK 基本完成 * 优化错误和最终结果处理 * 添加微信小程序 example * 更好的类型名称以及移除 UploadBlob 的导出 * 移除微信小程序 SDK 直传 base64 的支持 * 调整示例目录结构和位置 * 错误处理等细节调整 * 添加鸿蒙基本实现(仅支持分片上传) * 为 queue 添加基本的单元测试 * UploadFile 设计内敛 * update lock * fix bug * update actions * fix typo * update package info * 移除与本次无关的浏览器端代码 * 补充上传时指定 key 和 mimetype 的能力 * 补充配置文件 * 添加自定义变量&metadata支持 * 更新配置文件 * 添加浏览器和 react-native 支持 * 添加 rn examples * 暂时移除 rn * 鸿蒙细节调整 * 添加鸿蒙系统兼容性检查 * 添加 browser example * 细节调整 * browser 添加 webWorker 演示 * 浏览器端文件名处理优化 * 优化鸿蒙的文件类型处理 * 优化鸿蒙底层文件处理 * 添加 uploadHosts 支持 * 更新说明文档 * update readme & changelog * 添加 v1 分片上传支持 * 优化类型信息 * add Progress export * fix ohpm install command in radme.md
1 parent c36119d commit f366200

File tree

257 files changed

+65919
-73341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+65919
-73341
lines changed

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/dev-check.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,18 @@ jobs:
1010
- uses: actions/setup-node@v3
1111
with:
1212
cache: 'npm'
13-
node-version: 12
14-
- run: npm install
15-
- run: npm run lint
13+
node-version: 16
14+
- run: |
15+
npm install
16+
npm run lint
1617
test:
1718
runs-on: ubuntu-latest
1819
steps:
1920
- uses: actions/checkout@v3
2021
- uses: actions/setup-node@v3
2122
with:
2223
cache: 'npm'
23-
node-version: 12
24-
- run: npm install
25-
- run: npm run test
26-
build:
27-
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@v3
30-
- uses: actions/setup-node@v3
31-
with:
32-
cache: 'npm'
33-
node-version: 12
34-
- run: npm install
35-
- run: npm run build
24+
node-version: 16
25+
- run: |
26+
npm install
27+
npm run test

.github/workflows/npm-publish.yml

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,49 @@ on:
55
types: [published]
66

77
jobs:
8-
publish:
8+
publish-browser:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v3
1212
- uses: actions/setup-node@v3
1313
with:
14-
node-version: 12
14+
node-version: 16
1515
registry-url: https://registry.npmjs.org/
16-
- run: npm install
17-
- run: npm run build
18-
- run: npm publish
16+
- run: |
17+
npm install
18+
npm run build
19+
cd packages/browser/
20+
npm publish --dry-run
1921
env:
2022
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
23+
publish-wechat-miniprogram:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: 16
30+
registry-url: https://registry.npmjs.org/
31+
- run: |
32+
npm install
33+
npm run build
34+
cd packages/wechat-miniprogram/
35+
npm publish --dry-run
36+
env:
37+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
38+
publish-harmony:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v3
42+
- uses: actions/setup-node@v3
43+
with:
44+
node-version: 16
45+
registry-url: https://registry.npmjs.org/
46+
- run: |
47+
npm install
48+
npm run build
49+
cd packages/wechat-miniprogram/
50+
npm publish --dry-run
51+
env:
52+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
53+

.gitignore

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
.DS_Store
22
.vscode
33
node_modules
4-
bower_components
5-
demo/config.js
6-
deploy.sh
7-
npm-debug.log
8-
dist
9-
test/config.json
104
coverage
11-
lib
12-
esm
5+
output
6+
test-server.js
7+
miniprogram_npm

.npmignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 Qiniu, Ltd.<[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)