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

Introduce TypeScript and convert two components #161

Merged
merged 8 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Changelog
Changelog
---

## HEAD

- [breaking] Rewrites `src/components/icon` as a functional component and uses [`accessible-icon` from Radix](https://www.radix-ui.com/docs/primitives/utilities/accessible-icon) as an internal primitive.
- [breaking] Rewrites `src/components/control-wrapper` as a functional component.
- [feature] Introduces TypeScript to the source code and converts:
- `src/docs/*`
- `src/components/utils/*`
- `src/components/icon/*`
- `src/components/control-wrapper/*`
- [feature] Adds React Testing Library to newly ported components

## 2.0.0-beta.2

Expand Down
20 changes: 16 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
'use strict';

module.exports = {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: ['@babel/plugin-proposal-class-properties']
presets: ['@mapbox/babel-preset-mapbox'],
overrides: [
{
test: /\.tsx$/,
presets: [
'@mapbox/babel-preset-mapbox',
[
'@babel/typescript',
{
allExtensions: true,
isTSX: true
}
]
]
}
]
};
9 changes: 7 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
module.exports = {
coverageReporters: ['text', 'html'],
clearMocks: true,
testMatch: ['**/__tests__/*.test.js'],
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest'
},
testRegex: '.*\\.test\\.(ts|tsx|js)$',
setupFiles: ['./src/test-utils/jest-setup.js'],
setupFilesAfterEnv: ['./src/test-utils/jest-setup-framework.js']
setupFilesAfterEnv: ['./src/test-utils/jest-framework-setup.js'],
testEnvironment: 'jest-environment-jsdom'
};
Loading