@stripe/ui-extension-tools
v0.1.0
Published
Developer tools for Stripe UI Extensions
Maintainers
Keywords
Readme
Stripe UI Extension Tools
This package contains packages and configurations to support development with the Stripe UI Extension SDK. For details on creating a Stripe App, please refer to the Stripe Apps documentation.
Changelog
0.1.0
Migration guide: 0.0.1 to 0.1.0
- ESLint 9, Jest 29,
ts-jest29, and TypeScript 5 are now peer dependencies. - Converted shared CommonJS configs to ES modules:
eslint.config.ui-extension.mjsandjest.config.ui-extension.mjs. - Updated shared ESLint config for ESLint 9 flat config.
0.0.1
- Initial release
Migration Guide
0.0.1 to 0.1.0
Version 0.1.0 moves the host project toolchain into peer dependencies and updates the shared ESLint and Jest configs for the current toolchain.
Declare peer dependencies
Projects using @stripe/ui-extension-tools must now declare the required toolchain packages in their own package.json. This keeps ESLint, Jest, ts-jest, and TypeScript versions explicit in each project instead of hiding them behind this package.
Add the peer dependencies that match the shared configs you use:
{
"devDependencies": {
"@types/jest": "^29.0.0",
"eslint": "^9.0.0",
"jest": "^29.0.0",
"ts-jest": "^29.4.7",
"typescript": ">=5.0.0 <6.1.0"
}
}At minimum, projects using the shared ESLint config need eslint and typescript. Projects using the shared Jest config also need jest, ts-jest, and @types/jest.
Update shared config filenames
The shared configs are now ES modules and use .mjs filenames.
If your project referenced the old CommonJS config files, update those references:
- @stripe/ui-extension-tools/eslintrc.ui-extension
+ @stripe/ui-extension-tools/eslint.config.ui-extension.mjs
- @stripe/ui-extension-tools/jest.config.ui-extension
+ @stripe/ui-extension-tools/jest.config.ui-extension.mjsUpdate ESLint configuration
The shared ESLint config now targets ESLint 9 flat config. Use it from an eslint.config.mjs file:
import uiExtensionConfig from '@stripe/ui-extension-tools/eslint.config.ui-extension.mjs';
export default [...uiExtensionConfig];Update Jest configuration
The shared Jest config is also an ES module:
import uiExtensionJestConfig from '@stripe/ui-extension-tools/jest.config.ui-extension.mjs';
export default {...uiExtensionJestConfig};