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: Accumulate Events #65

Merged
merged 41 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ee49b2a
feat: editor config, sane!
whizzzkid Jan 19, 2023
d07079d
Add event accumulator class
whizzzkid Jan 19, 2023
ccece9b
feat: Update types and hookup accumulator
whizzzkid Jan 19, 2023
f1da631
fix: configs
whizzzkid Jan 20, 2023
06ef5a9
feat: moving types to set rootDir
whizzzkid Jan 20, 2023
525234c
adding test folder
whizzzkid Jan 20, 2023
b8cde72
adding relevant types
whizzzkid Jan 20, 2023
882075f
types migration
whizzzkid Jan 20, 2023
6a59727
fix: add_event
whizzzkid Jan 20, 2023
dd6a6cb
feat: adding accumulator test.
whizzzkid Jan 20, 2023
1802c4e
breaking down logic
whizzzkid Jan 20, 2023
9e62d8f
fix: import order
whizzzkid Jan 20, 2023
ded115c
fix: sinon stubs
whizzzkid Jan 20, 2023
719519c
feat: Adding impl using map
whizzzkid Jan 20, 2023
c459dcb
adding flushAll method
whizzzkid Jan 20, 2023
d23fcb6
Hooking up to the beforunload event
whizzzkid Jan 20, 2023
db97c66
lint
whizzzkid Jan 20, 2023
a28bc36
Merge branch 'main' into feat/accumulate-events
whizzzkid Jan 21, 2023
5791d84
fix: :twisted_rightwards_arrows: merged with upstream
whizzzkid Jan 21, 2023
98a7ab2
fix: :package: adding missing package after merge
whizzzkid Jan 21, 2023
90b37ba
fix: :test_tube: EventAccumulator
whizzzkid Jan 21, 2023
eb5ae38
fix: :adhesive_bandage: fix imports
whizzzkid Jan 21, 2023
f638eb8
fix: :truck: rename to spec.ts
whizzzkid Jan 21, 2023
1238a5f
fix: :recycle: cleanup
whizzzkid Jan 21, 2023
6bd68c6
fix: :package: package-lock.json
whizzzkid Jan 21, 2023
7c07a7d
fix: :pencil2: spec naming and scope
whizzzkid Jan 23, 2023
4fe767b
Merge branch 'main' into feat/accumulate-events
whizzzkid Jan 25, 2023
9eea9a5
fix: :wrench: don't disable rules globally
whizzzkid Jan 25, 2023
2722ec2
fix: :wrench: only apply eslint overrides to spec files.
whizzzkid Jan 25, 2023
8eb34e9
fix: :rotating_light: fixes lint.
whizzzkid Jan 26, 2023
d34928b
fix: :recycle: Moving tests to node folder
whizzzkid Jan 26, 2023
772018d
fix: :label: generics
whizzzkid Jan 26, 2023
2313806
fix: :necktie: instantiating at declaration
whizzzkid Jan 26, 2023
8c4f560
fix: :memo: adding missing documentation
whizzzkid Jan 26, 2023
c999b06
fix: :necktie: fixing unload event to handle both browser and node.
whizzzkid Jan 26, 2023
fbaa4f3
fix: :truck: digest -> accumulate
whizzzkid Jan 26, 2023
dfc72df
fix: generics
whizzzkid Jan 26, 2023
c2c4277
fix: :pencil2: dupe imports
whizzzkid Jan 26, 2023
a0242f9
fix: fixing appKey
whizzzkid Jan 26, 2023
ab218ab
feat: :zap: useFakeTimers instead of await
whizzzkid Jan 26, 2023
3549175
fix: :recycle: move call order
whizzzkid Jan 26, 2023
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
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root=true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
16 changes: 15 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,19 @@
"sourceType": "module"
},
"rules": {
}
"sort-imports": ["error"]
},
"overrides": [
{
"files": [
"test/**/*.ts"
whizzzkid marked this conversation as resolved.
Show resolved Hide resolved
],
"parserOptions": {
"project": "test/tsconfig.json"
},
"env": {
"mocha": true
whizzzkid marked this conversation as resolved.
Show resolved Hide resolved
}
}
]
}
9 changes: 9 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extensions": ["ts"],
"spec": ["test/**/*.test.*"],
"require": ["ts-node/register"],
"node-option": [
"experimental-specifier-resolution=node",
Copy link
Member

Choose a reason for hiding this comment

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

do we need this if we're using ts-node/esm loader?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for some reason, it wants both.

"loader=ts-node/esm"
]
}
226 changes: 226 additions & 0 deletions package-lock.json

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

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"lint": "aegir lint",
"release": "aegir release",
"build": "aegir build",
"test": "aegir test",
"test": "aegir test --target node --files 'test/**/*.test.ts'",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
Expand All @@ -173,7 +173,9 @@
"@storybook/manager-webpack5": "^6.5.15",
"@storybook/react": "^6.5.15",
"@storybook/testing-library": "^0.0.13",
"@types/mocha": "^10.0.1",
"@types/react-dom": "^18.0.10",
"@types/sinon": "^10.0.13",
"@types/styled-components": "^5.1.26",
"aegir": "^38.1.0",
"babel-loader": "^9.1.2",
Expand All @@ -187,7 +189,9 @@
"html-loader": "^4.2.0",
"postcss": "^8.4.21",
"prettier": "^2.8.2",
"sinon": "^15.0.1",
"style-loader": "^3.3.1",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
},
"peerDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions src/BrowserMetrics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Countly from 'countly-sdk-web'

import MetricsProvider, { MetricsProviderConstructorOptions } from './MetricsProvider.js'
import Countly from 'countly-sdk-web'

export class BrowserMetricsProvider extends MetricsProvider<typeof Countly> {
constructor (args: Omit<MetricsProviderConstructorOptions<typeof Countly>, 'metricsService'>) {
Expand Down
Loading