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

[UIE-153] Create analysis package #4718

Merged
merged 1 commit into from
Mar 28, 2024
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
156 changes: 130 additions & 26 deletions .pnp.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@dnd-kit/sortable": "^7.0.2",
"@dnd-kit/utilities": "^3.2.1",
"@microlink/react-json-view": "^1.22.2",
"@terra-ui-packages/analysis": "*",
"@terra-ui-packages/components": "*",
"@terra-ui-packages/core-utils": "*",
"animate.css": "^4.1.1",
Expand Down
6 changes: 6 additions & 0 deletions packages/analysis/jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// ESLint thinks @terra-ui-packages/test-utils should be listed in dependencies instead of devDependencies.
// TODO: Fix this in ESLint configuration.
// eslint-disable-next-line import/no-extraneous-dependencies
import { getJestConfig } from '@terra-ui-packages/test-utils';

export default getJestConfig();
49 changes: 49 additions & 0 deletions packages/analysis/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@terra-ui-packages/analysis",
Copy link
Contributor Author

@nawatts nawatts Mar 15, 2024

Choose a reason for hiding this comment

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

Opinions on name? This matches the existing "analysis" folder, but could also be "interactive-analysis", etc (because interactive analysis more precisely describes the feature area, not because of the team name).

Copy link
Contributor

Choose a reason for hiding this comment

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

I think analysis is fine. It's closest to the name of the tab where all the functionality lives

"version": "0.0.1",
"scripts": {
"build": "vite build --emptyOutDir",
"dev": "vite build --mode=development --watch",
"test": "jest"
},
"type": "module",
"module": "./lib/es/index.js",
"main": "./lib/cjs/index.cjs",
"types": "./lib/types/index.d.ts",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.cjs",
"types": "./lib/types/index.d.ts"
}
},
"files": [
"lib/cjs/**",
"lib/es/**",
"lib/types/**/*.d.ts"
],
"dependencies": {
"@terra-ui-packages/components": "^0.0.6",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This points out an issue we'll have to deal with sometime where packages in the Terra UI repository can depend on older versions of Terra UI packages than the current version in the repository. I can take care of it though.

"lodash": "^4.17.21"
},
"devDependencies": {
"@terra-ui-packages/build-utils": "^1.0.0",
"@terra-ui-packages/test-utils": "*",
"@testing-library/dom": "^9.3.1",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^28.1.8",
"@types/lodash": "^4.14.184",
"@types/react": "^18.2.15",
"@types/testing-library__jest-dom": "^5.14.9",
"jest": "^27.4.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "~5.1.6",
"vite": "^4.5.2"
},
"peerDependencies": {
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
Empty file added packages/analysis/src/index.ts
Empty file.
9 changes: 9 additions & 0 deletions packages/analysis/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"noImplicitAny": true,
Copy link
Contributor Author

@nawatts nawatts Mar 15, 2024

Choose a reason for hiding this comment

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

This is stricter than the Terra UI app's configuration, so some code may have to be updated when it's moved over, but I think it's well worth it.
https://www.typescriptlang.org/tsconfig#noImplicitAny

"outDir": "lib/types",
"rootDir": "src"
},
"include": ["src"]
}
3 changes: 3 additions & 0 deletions packages/analysis/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { viteConfig as defineBaseConfig } from '@terra-ui-packages/build-utils';

export default defineBaseConfig;
29 changes: 28 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4639,6 +4639,32 @@ __metadata:
languageName: node
linkType: hard

"@terra-ui-packages/analysis@*, @terra-ui-packages/analysis@workspace:packages/analysis":
version: 0.0.0-use.local
resolution: "@terra-ui-packages/analysis@workspace:packages/analysis"
dependencies:
"@terra-ui-packages/build-utils": ^1.0.0
"@terra-ui-packages/components": ^0.0.6
"@terra-ui-packages/test-utils": "*"
"@testing-library/dom": ^9.3.1
"@testing-library/react": ^14.0.0
"@testing-library/user-event": ^14.4.3
"@types/jest": ^28.1.8
"@types/lodash": ^4.14.184
"@types/react": ^18.2.15
"@types/testing-library__jest-dom": ^5.14.9
jest: ^27.4.3
lodash: ^4.17.21
react: 18.2.0
react-dom: 18.2.0
typescript: ~5.1.6
vite: ^4.5.2
peerDependencies:
react: 18.2.0
react-dom: 18.2.0
languageName: unknown
linkType: soft

"@terra-ui-packages/build-utils@^1.0.0, @terra-ui-packages/build-utils@workspace:packages/build-utils":
version: 0.0.0-use.local
resolution: "@terra-ui-packages/build-utils@workspace:packages/build-utils"
Expand All @@ -4652,7 +4678,7 @@ __metadata:
languageName: unknown
linkType: soft

"@terra-ui-packages/components@*, @terra-ui-packages/components@workspace:packages/components":
"@terra-ui-packages/components@*, @terra-ui-packages/components@^0.0.6, @terra-ui-packages/components@workspace:packages/components":
version: 0.0.0-use.local
resolution: "@terra-ui-packages/components@workspace:packages/components"
dependencies:
Expand Down Expand Up @@ -16814,6 +16840,7 @@ __metadata:
"@storybook/react": ^7.6.17
"@storybook/react-vite": ^7.6.17
"@storybook/test": ^7.6.17
"@terra-ui-packages/analysis": "*"
"@terra-ui-packages/components": "*"
"@terra-ui-packages/core-utils": "*"
"@terra-ui-packages/test-utils": "*"
Expand Down
Loading