Skip to content

Commit

Permalink
chore: chore: release: v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
itsyuxuan committed Aug 16, 2022
1 parent c2b4b91 commit a8ba0f3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vitegil-sdk",
"type": "module",
"version": "1.0.0",
"version": "1.1.0",
"packageManager": "[email protected]",
"description": "Vitegil tracker SDK for frontend monitoring, built with rollup",
"homepage": "https://github.com/vitegil/vitegil-sdk",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ export default [
{
file: path.resolve(__dirname, './dist/index.esm.js'),
format: 'esm',
exports: 'auto',
},
{
file: path.resolve(__dirname, './dist/index.cjs.js'),
format: 'cjs',
exports: 'auto',
},
{
file: path.resolve(__dirname, './dist/index.js'),
format: 'umd',
exports: 'auto',
name: 'Tracker',
},
],
Expand All @@ -45,6 +48,7 @@ export default [
output: {
file: path.resolve(__dirname, './dist/index.d.ts'),
format: 'es',
exports: 'auto',
},
plugins: [dts()],
},
Expand Down
4 changes: 2 additions & 2 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default class Tracker {
/**
* 上报用户uuid(计算uv)
*/
private reportID(): void {
private reportId(): void {
if (this.data.lazyReport) {
this.saveTracker({
event: 'uv-event',
Expand Down Expand Up @@ -345,7 +345,7 @@ export default class Tracker {
*/
private installTracker(): void {
if (this.data.uuid)
this.reportID()
this.reportId()

if (this.data.historyTracker) {
this.captureEvents(
Expand Down
6 changes: 3 additions & 3 deletions src/lib/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ function getOsVersion(os: string | undefined, u: string): string {
}

function getNetwork(navigator: any) {
const netWork = navigator && navigator.connection && navigator.connection.effectiveType
return netWork
const network = navigator && navigator.connection && navigator.connection.effectiveType
return network
}

function getLanguage(navigator: any) {
Expand Down Expand Up @@ -171,7 +171,7 @@ export function getDeviceData() {
screenHeight: _window.screen.height,
screenWidth: _window.screen.width,
language: getLanguage(navigator),
netWork: getNetwork(navigator),
network: getNetwork(navigator),
orientation: getOrientationStatus(_window),
browser: getValue(map, BrowserType),
browserInfo: getBrowserInfo(map, ua),
Expand Down
4 changes: 2 additions & 2 deletions src/types/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const OsVersionMap: version = {
* @screenHeight 屏幕高
* @screenWidth 屏幕宽
* @language 当前使用的语言-国家
* @netWork 联网类型
* @network 联网类型
* @orientation 横竖屏
* @browser 浏览器类型
* @browserInfo 浏览器信息
Expand All @@ -228,7 +228,7 @@ export interface DeviceData {
screenHeight: number | undefined
screenWidth: number | undefined
language: string | undefined
netWork: string | undefined
network: string | undefined
orientation: string | undefined
browser: string | undefined
browserInfo: string | undefined
Expand Down

0 comments on commit a8ba0f3

Please sign in to comment.