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

chore: readme updates #1706

Merged
merged 2 commits into from
May 2, 2024
Merged

chore: readme updates #1706

merged 2 commits into from
May 2, 2024

Conversation

ameypv-rudder
Copy link
Contributor

@ameypv-rudder ameypv-rudder commented May 2, 2024

PR Description

Updates to the JavaScript SDK readme.

Linear task (optional)

https://linear.app/rudderstack/issue/DOCS-901/update-javascript-sdk-readme

Cross Browser Tests

Please confirm you have tested for the following browsers:

  • Chrome
  • Firefox
  • IE11

Sanity Suite

  • All sanity suite test cases pass locally

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Summary by CodeRabbit

  • Documentation
    • Updated links and installation commands in the README to reflect the new documentation and package names.
    • Revised code snippets for importing and exporting the analytics module to align with the latest package updates.

@ameypv-rudder ameypv-rudder added the documentation Improvements or additions to documentation label May 2, 2024
@ameypv-rudder ameypv-rudder self-assigned this May 2, 2024
@ameypv-rudder ameypv-rudder requested a review from a team as a code owner May 2, 2024 08:03
Copy link
Contributor

coderabbitai bot commented May 2, 2024

Walkthrough

Walkthrough

The changes involve updating the RudderStack JavaScript SDK's documentation links and package names for alignment with the latest versions and naming conventions. This includes adjustments to installation commands, import statements in the code, and a correction in the exported variable name for consistency.

Changes

File Change Summary
README.md Updated documentation link, modified installation command, changed import statement, and corrected exported variable name.

Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 265b498 and 991cae3.
Files selected for processing (1)
  • README.md (6 hunks)
Additional Context Used
LanguageTool (51)
README.md (51)

Near line 22: Possible spelling mistake found.
Context: ...Community Slack

--- # RudderStack JavaScript SDK The JavaScript SDK lets...


Near line 24: Possible spelling mistake found.
Context: ...d it to your specified destinations via RudderStack. > For detailed documentation on the R...


Near line 26: Possible spelling mistake found.
Context: ...k. > For detailed documentation on the RudderStack JavaScript SDK, click [here](https:...


Near line 42: Possible spelling mistake found.
Context: ...precated the service worker export from RudderStack JavaScript SDK npm package and decouple...


Near line 42: Possible spelling mistake found.
Context: ... export from RudderStack JavaScript SDK npm package and decoupled it to a new packa...


Near line 42: Possible spelling mistake found.
Context: ...kage and decoupled it to a new package.
If you still wish to use it for your p...


Near line 42: Possible spelling mistake found.
Context: ...t for your project, see [@rudderstack/analytics-js-service-worker package](https://www.npmjs.com/packag...


Near line 87: Possible spelling mistake found.
Context: ...e/@rudderstack/analytics-js) to package RudderStack directly into your project. To install...


Near line 89: Possible spelling mistake found.
Context: ...o your project. To install the SDK via npm, run the following command: ```bash np...


Near line 95: Possible spelling mistake found.
Context: ...th your Node.js application, see the [RudderStack Node.js documentation](https://www.ru...


Near line 149: Possible typo: you repeated a whitespace
Context: ...upported browser versions | Browser | Supported Versions | | :----------...


Near line 151: Possible typo: you repeated a whitespace
Context: ...---- | :--------------------- | | Safari | v7 and above | | IE ...


Near line 151: Possible typo: you repeated a whitespace
Context: ...----- | | Safari | v7 and above | | IE | v11 and above ...


Near line 152: Possible typo: you repeated a whitespace
Context: ... | v7 and above | | IE | v11 and above | | Edge ...


Near line 152: Possible typo: you repeated a whitespace
Context: ... | | IE | v11 and above | | Edge | v80 and above ...


Near line 153: Possible typo: you repeated a whitespace
Context: ... | v11 and above | | Edge | v80 and above | | Mozilla Fi...


Near line 153: Possible typo: you repeated a whitespace
Context: ... | | Edge | v80 and above | | Mozilla Firefox | v47 and above ...


Near line 154: Possible typo: you repeated a whitespace
Context: ... | | Mozilla Firefox | v47 and above | | Chrome | v54 and above ...


Near line 155: Possible typo: you repeated a whitespace
Context: ...fox | v47 and above | | Chrome | v54 and above | | Opera ...


Near line 155: Possible typo: you repeated a whitespace
Context: ... | | Chrome | v54 and above | | Opera | v43 and above ...


Near line 156: Possible typo: you repeated a whitespace
Context: ... | v54 and above | | Opera | v43 and above | > You can t...


Near line 156: Possible typo: you repeated a whitespace
Context: ... | | Opera | v43 and above | > You can try adding the browser [pol...


Near line 162: Do you wish to insert an arrow?
Context: ...e JavaScript SDK from an older version (<=v1.1), see the [Migration Guide](https:/...


Near line 169: Possible spelling mistake found.
Context: ...ck and send events from your website to RudderStack. Make sure to replace the write key and...


Near line 169: Please check whether ‘right’ (opposite of ‘left’) might be the correct word here instead of ‘write’ (communicate or express by writing).
Context: ...o RudderStack. Make sure to replace the write key and data plane URL with their actua...


Near line 175: Possible spelling mistake found.
Context: ...>, [loadOptions]); ``` You can use the [loadOptions](https://www.rudderstack.com/docs/sour...


Near line 188: Possible spelling mistake found.
Context: ...e particular destinations. - Currently, loadIntegration is supported only for Amplitude and Go...


Near line 219: Possible spelling mistake found.
Context: ... SDK captures the user information like userId, firstName, lastName, email, and...


Near line 219: Possible spelling mistake found.
Context: ...res the user information like userId, firstName, lastName, email, and phone, alo...


Near line 219: Possible spelling mistake found.
Context: ...information like userId, firstName, lastName, email, and phone, along with the ...


Near line 221: Possible spelling mistake found.
Context: ... visitors are automatically assigned an anonymousId. See the [**JavaScript SDK documentat...


Near line 264: Possible spelling mistake found.
Context: ...er-server versions (after v1.2). Using [RudderStack Open Source](https://www.rudderstack.co...


Near line 283: Possible spelling mistake found.
Context: ... the SDK - Look for run scripts in the package.json file for getting the browser minified ...


Near line 285: Loose punctuation mark.
Context: ...t ones are: - npm run build:browser: This outputs **dist/cdn/legacy/rudder-a...


Near line 285: Possible spelling mistake found.
Context: ...run build:browser: This outputs **dist/cdn/legacy/rudder-analytics.min.js**. - ...


Near line 286: Loose punctuation mark.
Context: ...lytics.min.js**. - npm run build:npm: This outputs dist/npm folder that c...


Near line 286: Possible spelling mistake found.
Context: ...npm run build:npm`: This outputs dist/npm folder that contains the npm package ...


Near line 286: Possible spelling mistake found.
Context: ...s dist/npm folder that contains the npm package contents. - `npm run build:in...


Near line 287: Loose punctuation mark.
Context: ...nts. - npm run build:integration:all: This outputs dist/cdn/legacy folder...


Near line 287: Possible spelling mistake found.
Context: ...d:integration:all`: This outputs dist/cdn/legacy folder that contains the integ...


Near line 289: Possible spelling mistake found.
Context: ... contains the integrations. > We use rollup to build our SDKs. The configuration ...


Near line 289: Possible spelling mistake found.
Context: ... The configuration for it is present in rollup-configs folder. - For adding or removing inte...


Near line 298: This phrase is redundant. Consider writing “details”.
Context: ...-js-service-worker)). For examples and specific details, see [Chrome Extensions Usage](https://...


Near line 301: Possible spelling mistake found.
Context: ....md). ## Usage in Serverless runtimes RudderStack JS SDK [service worker](https://www.npm...


Near line 303: Possible spelling mistake found.
Context: ...ess runtimes like Cloudflare Workers or Vercel Edge functions. For examples and speci...


Near line 305: This phrase is redundant. Consider writing “details”.
Context: ...ercel Edge functions. For examples and specific details look into: - [Vercel Edge Usage](https...


Near line 307: Possible spelling mistake found.
Context: ...les and specific details look into: - [Vercel Edge Usage](https://github.com/rudderla...


Near line 312: Consider using a more formal alternative.
Context: ...see you contribute to this project. Get more information on how to contribute [here](./CONTR...


Near line 316: Possible spelling mistake found.
Context: ... on any of the sections covered in this readme, you can [contact us](mailto:%20doc...


Near line 320: Possible spelling mistake found.
Context: ...stack-slack) channel. ## Follow Us - [RudderStack Blog][rudderstack-blog] - [Slack][slack...


Near line 327: Possible spelling mistake found.
Context: ...Medium][medium] - [YouTube][youtube] - [HackerNews][hackernews] - [Product Hunt][producthu...

Additional comments not posted (5)
README.md (5)

26-26: Update the documentation URL to match the new address.


42-42: Ensure the deprecation notice is clear and provides all necessary information for users transitioning to the new package.


92-92: Confirm the new npm installation command reflects the correct package name.


103-108: Verify the updated import and export statements to ensure they reflect the new structure and naming conventions of the exported object.


114-119: Check the consistency of the require method and export statement for CommonJS modules.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot]
coderabbitai bot previously approved these changes May 2, 2024
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.24%. Comparing base (66e0122) to head (991cae3).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1706   +/-   ##
========================================
  Coverage    54.24%   54.24%           
========================================
  Files          462      462           
  Lines        15655    15655           
  Branches      3115     3096   -19     
========================================
  Hits          8492     8492           
- Misses        5817     5882   +65     
+ Partials      1346     1281   -65     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented May 2, 2024

size-limit report 📦

Name Size (Base) Size (Current) Size Limit Status
Common Code - No bundling 15.78 KB 15.78 KB (0%) 16.5 KB
Remote Module Federation Mapping - CDN 330 B 330 B (0%) 512 B
Remote Module Federated Plugins - CDN 5.71 KB 5.71 KB (0%) 6 KB
Core ESM - NPM 7.68 KB 7.68 KB (0%) 8 KB
Core CJS - NPM 22.88 KB 22.88 KB (0%) 23 KB
Core - NPM 23.03 KB 23.03 KB (0%) 23.5 KB
Core Legacy - CDN 43.41 KB 43.41 KB (0%) 44 KB
Core - CDN 23.18 KB 23.18 KB (0%) 23.5 KB
Core (legacy build) - CDN - v1.1 31.53 KB 31.53 KB (0%) 32 KB
Core - NPM - v1.1 31.55 KB 31.55 KB (0%) 32 KB
Service Worker Module 22.64 KB 22.64 KB (0%) 24 KB
All Integrations (legacy build) - CDN 98.61 KB 98.61 KB (0%) 105 KB

Co-authored-by: Sai Kumar Battinoju <[email protected]>
Copy link

sonarqubecloud bot commented May 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ameypv-rudder ameypv-rudder merged commit b410ec6 into develop May 2, 2024
10 checks passed
@ameypv-rudder ameypv-rudder deleted the js-sdk-readme-updates branch May 2, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants