Skip to content

Commit 918e1a0

Browse files
authored
feat1.4.1 (#159)
Co-authored-by: chrisftian <[email protected]>
1 parent bcf969e commit 918e1a0

File tree

7 files changed

+182
-93
lines changed

7 files changed

+182
-93
lines changed

.babelrc

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

babel.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
"sourceType": "unambiguous",
3+
"presets": [
4+
["@babel/preset-env",
5+
{
6+
"targets": {
7+
"browsers": ["> 1%", "last 2 versions"]
8+
}
9+
}
10+
]
11+
],
12+
"plugins": [
13+
"@babel/plugin-transform-runtime"
14+
]
15+
}

dist/cos-js-sdk-v5.js

Lines changed: 157 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cos-js-sdk-v5.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "cos-js-sdk-v5",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)",
5-
"main": "index.js",
5+
"main": "dist/cos-js-sdk-v5.js",
66
"types": "index.d.ts",
77
"scripts": {
88
"server": "node server/sts.js",
@@ -27,6 +27,7 @@
2727
},
2828
"devDependencies": {
2929
"@babel/core": "7.17.9",
30+
"@babel/plugin-transform-runtime": "7.18.10",
3031
"@babel/preset-env": "7.16.11",
3132
"babel-loader": "8.2.5",
3233
"body-parser": "^1.18.3",
@@ -37,8 +38,8 @@
3738
"puppeteer-to-istanbul": "^1.4.0",
3839
"qcloud-cos-sts": "^3.0.2",
3940
"request": "^2.87.0",
41+
"terser-webpack-plugin": "4.2.3",
4042
"webpack": "4.46.0",
41-
"webpack-cli": "4.10.0",
42-
"terser-webpack-plugin": "4.2.3"
43+
"webpack-cli": "4.10.0"
4344
}
4445
}

src/tracker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const utils = {
3737
},
3838
// 获取pc端操作系统类型
3939
getOsType() {
40+
if (typeof navigator !== 'object') {
41+
return 'unknown os';
42+
}
4043
var agent = navigator.userAgent.toLowerCase();
4144
var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
4245
if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ replaceVersion();
5050
module.exports = {
5151
mode: process.env.NODE_ENV,
5252
entry: path.resolve(__dirname, './index.js'),
53-
devtool: "none",
53+
devtool: process.env.NODE_ENV === 'production' ? "none" : "cheap-inline-source-map",
5454
output: {
5555
path: path.resolve(__dirname, './dist'),
5656
publicPath: '/dist/',

0 commit comments

Comments
 (0)