Skip to content

Commit

Permalink
feat1.4.1 (#159)
Browse files Browse the repository at this point in the history
Co-authored-by: chrisftian <[email protected]>
  • Loading branch information
livehigh and livehigh authored Aug 18, 2022
1 parent bcf969e commit 918e1a0
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 93 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

15 changes: 15 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
"sourceType": "unambiguous",
"presets": [
["@babel/preset-env",
{
"targets": {
"browsers": ["> 1%", "last 2 versions"]
}
}
]
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
241 changes: 157 additions & 84 deletions dist/cos-js-sdk-v5.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "cos-js-sdk-v5",
"version": "1.4.0",
"version": "1.4.1",
"description": "JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)",
"main": "index.js",
"main": "dist/cos-js-sdk-v5.js",
"types": "index.d.ts",
"scripts": {
"server": "node server/sts.js",
Expand All @@ -27,6 +27,7 @@
},
"devDependencies": {
"@babel/core": "7.17.9",
"@babel/plugin-transform-runtime": "7.18.10",
"@babel/preset-env": "7.16.11",
"babel-loader": "8.2.5",
"body-parser": "^1.18.3",
Expand All @@ -37,8 +38,8 @@
"puppeteer-to-istanbul": "^1.4.0",
"qcloud-cos-sts": "^3.0.2",
"request": "^2.87.0",
"terser-webpack-plugin": "4.2.3",
"webpack": "4.46.0",
"webpack-cli": "4.10.0",
"terser-webpack-plugin": "4.2.3"
"webpack-cli": "4.10.0"
}
}
3 changes: 3 additions & 0 deletions src/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const utils = {
},
// 获取pc端操作系统类型
getOsType() {
if (typeof navigator !== 'object') {
return 'unknown os';
}
var agent = navigator.userAgent.toLowerCase();
var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ replaceVersion();
module.exports = {
mode: process.env.NODE_ENV,
entry: path.resolve(__dirname, './index.js'),
devtool: "none",
devtool: process.env.NODE_ENV === 'production' ? "none" : "cheap-inline-source-map",
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
Expand Down

0 comments on commit 918e1a0

Please sign in to comment.