### Setting up the lemonsqueezy.js Development Environment Source: https://github.com/lmsqueezy/lemonsqueezy.js/blob/main/CONTRIBUTING.md Instructions on how to clone the repository, install project dependencies using Bun, and start the local development server. ```bash bun install ``` ```bash bun run dev ``` -------------------------------- ### Generating Changelog Entries with Changesets Source: https://github.com/lmsqueezy/lemonsqueezy.js/blob/main/CONTRIBUTING.md Commands used with Changesets for managing releases and generating detailed changelog descriptions for contributions, including an option for empty changesets. ```bash bun changeset ``` ```bash bun changeset add --empty ``` -------------------------------- ### Initializing SDK and Fetching User - JavaScript Source: https://github.com/lmsqueezy/lemonsqueezy.js/blob/main/README.md This snippet demonstrates the basic setup of the Lemon Squeezy SDK with an API key and how to fetch data for the authenticated user. It shows importing necessary functions, initializing the SDK, making an API call, and handling potential errors or displaying successful data. ```javascript import { getAuthenticatedUser, lemonSqueezySetup, } from "@lemonsqueezy/lemonsqueezy.js"; const apiKey = import.meta.env.LEMON_SQUEEZY_API_KEY; lemonSqueezySetup({ apiKey, onError: (error) => console.error("Error!", error), }); const { data, error } = await getAuthenticatedUser(); if (error) { console.log(error.message); } else { console.log(data); } ``` -------------------------------- ### Initializing Lemon Squeezy SDK and Querying User - TypeScript Source: https://github.com/lmsqueezy/lemonsqueezy.js/blob/main/CHANGELOG.md This snippet demonstrates how to initialize the Lemon Squeezy SDK with your API key using the new setup function and then fetch the authenticated user's data. It also shows how to access the returned data, errors, and status code. ```TypeScript lemonSqueezySetup({ apiKey }); const { data, error, statusCode } = await getAuthenticatedUser(); ``` -------------------------------- ### Installing Lemon Squeezy SDK via Package Manager Source: https://github.com/lmsqueezy/lemonsqueezy.js/blob/main/README.md These commands show how to add the official Lemon Squeezy JavaScript SDK to your project using popular package managers. Choose the command corresponding to your preferred package manager (bun, pnpm, or npm). ```bash bun install @lemonsqueezy/lemonsqueezy.js ``` ```bash pnpm install @lemonsqueezy/lemonsqueezy.js ``` ```bash npm install @lemonsqueezy/lemonsqueezy.js ``` -------------------------------- ### Running Tests and Type Checking with Bun Source: https://github.com/lmsqueezy/lemonsqueezy.js/blob/main/CONTRIBUTING.md Commands to execute the project's unit tests using Bun's test runner and to perform type checking to ensure code correctness before submitting changes. ```bash bun test ``` ```bash bun test test/.ts ``` ```bash bun run typecheck ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.