Skip to content
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f294708
add ability to capture customer events before library init
silesky May 8, 2022
3f05742
add promise compat type definitions and tests
silesky May 8, 2022
594fce2
rename files
silesky May 8, 2022
abc80d4
add filter method, remove callAnalyticsMethod from class
silesky May 8, 2022
1df199c
refactor flush
silesky May 8, 2022
b663137
add allSettled
silesky May 8, 2022
b979687
add allSettled test
silesky May 9, 2022
9944ee0
wip
silesky May 10, 2022
8507f59
move load out of AnalyticsBrowser class
silesky May 10, 2022
584528d
fix type error in pages
silesky May 10, 2022
f774b4b
don't bother returning allSettled result
silesky May 10, 2022
a864b66
remove export
silesky May 10, 2022
ab080df
preserve existing logic regarding parallel and serial execution
silesky May 10, 2022
01e7f95
rename fn
silesky May 10, 2022
1a351b6
add comments
silesky May 10, 2022
04f16ca
use map
silesky May 10, 2022
67e693e
wip
silesky May 11, 2022
4ca0665
add chainable method
silesky May 11, 2022
1e37957
add more tests
silesky May 11, 2022
ed2e060
Update comment
silesky May 12, 2022
1849c0a
Update comment
silesky May 12, 2022
fd654bd
differentiate between sync and async calls
silesky May 13, 2022
b326714
remove allSettled
silesky May 13, 2022
6d84a76
move more shared logic outside
silesky May 13, 2022
e9e3680
tweak async execution
silesky May 13, 2022
011e3bb
tweak type
silesky May 13, 2022
044de6c
add multi instance smoke test
silesky May 13, 2022
1b3cec2
add more tests
silesky May 13, 2022
f7fa8d3
remove no-longer-needed ignore from jest config
silesky May 14, 2022
3ecde68
improve async test
silesky May 16, 2022
9b4c1c9
more tests
silesky May 16, 2022
9c02f90
refactor typedef tests
silesky May 16, 2022
f1042bc
test naming clean up
silesky May 16, 2022
7a064c4
remove resetGlobalState
silesky May 17, 2022
cd278d6
clarify test
silesky May 17, 2022
e77db68
add "this" test to event emitter
silesky May 17, 2022
f785c64
update pre-init buffer, add tests
silesky May 17, 2022
6e94ff5
check thenable instead of instanceof promise
silesky May 17, 2022
39f0f27
remove async
silesky May 17, 2022
4d2bddf
update thenable
silesky May 18, 2022
95ef70c
add more "this" tests
silesky May 18, 2022
4c2dccb
delete clearAllMocks since clearMocks option is true in jest config
silesky May 18, 2022
cdea3d7
make push a bit clearer
silesky May 18, 2022
4401356
get rid of .call since we have a test around it
silesky May 18, 2022
37cd27a
rename and move files into core
silesky May 18, 2022
9a534db
encapsulate snippet logic
silesky May 18, 2022
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
7 changes: 6 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-floating-promises": [
"error",
{
"ignoreVoid": true
}
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-types": "off" // TODO: turn on
Expand Down
3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ module.exports = {
'<rootDir>/dist/',
'<rootDir>/e2e-tests',
'<rootDir>/qa',
'<rootDir>/src/__tests__/test-writekeys',
'<rootDir>/src/__tests__/stats-writekey',
],
testMatch: ["**/?(*.)+(test).[jt]s?(x)"],
clearMocks: true,
testEnvironmentOptions: {
resources: 'usable',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
"cjs": "tsc -p tsconfig.cjs.json",
"run-example": "cd example && yarn && yarn dev",
"clean": "rm -rf dist",
"lint": "eslint '**/*.{js,jsx,ts,tsx}'",
"lint": "tsc --noEmit && eslint '**/*.{js,jsx,ts,tsx}'",
"prepare": "yarn pkg && husky install",
"test": "jest"
},
"size-limit": [
{
"path": "dist/umd/index.js",
"limit": "25.13 KB"
"limit": "25.9 KB"
}
],
"lint-staged": {
Expand Down
Loading