Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

upgrade analytics.js to analytics-next (browser SDK) #297

Merged
merged 12 commits into from
Apr 25, 2023

Conversation

silesky
Copy link
Contributor

@silesky silesky commented Apr 24, 2023

  • Add analytics-next typewriter support!
  • Use @segment/analytics-next type definitions as source of truth
  • Add type definition tests
npx ts-node src/__tests__/ts-typedef-tests/run-tests.ts

These tests confirm:

  • That the typescript clients have no type errors
  • That the typescript clients typings behaves as expected

Running the tests...

  1. Build typescript client using cli
  2. Imports that client into a type definition test that asserts that it's typed correctly
  3. Type checks both the client (artifact) and the type definition

@silesky silesky requested a review from oscb April 24, 2023 22:08
@silesky silesky changed the title Add analytics next typewriter Add support for analytics-next (browser SDK) Apr 24, 2023
@silesky silesky changed the title Add support for analytics-next (browser SDK) upgrade analytics.js to analytics-next (browser SDK) Apr 24, 2023
@silesky silesky requested a review from danieljackins April 25, 2023 01:31
Copy link
Contributor

@oscb oscb left a comment

Choose a reason for hiding this comment

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

Looks great!

Pretty good idea to add tsc tests to check that TS handles correctly the output types!

@silesky silesky force-pushed the add-analytics-next-typewriter branch from 69dd8a2 to 5349a17 Compare April 25, 2023 18:24
@silesky silesky merged commit 8477826 into master Apr 25, 2023
@silesky silesky deleted the add-analytics-next-typewriter branch April 25, 2023 20:53
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants