Skip to content

3. Adds ./testing entry points [LG-5028] #2814

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

Merged
merged 135 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
17293c1
Bump to TS5.0
TheSonOfThomp Apr 3, 2025
d008dc1
use typescript node API
TheSonOfThomp Apr 4, 2025
eee9c5c
handle cli options
TheSonOfThomp Apr 4, 2025
0b98361
use createSolutionBuilderHost
TheSonOfThomp Apr 4, 2025
b9dc060
add production flag
TheSonOfThomp Apr 4, 2025
58ea13f
makeTypescriptDiagnosticReporter
TheSonOfThomp Apr 4, 2025
ff84082
creates downlevelDts
TheSonOfThomp Apr 4, 2025
f744abe
downlevelDts parses package.json
TheSonOfThomp Apr 4, 2025
8afa687
use --downlevel flag
TheSonOfThomp Apr 4, 2025
5f9000f
add ts version override
TheSonOfThomp Apr 4, 2025
0d1c320
add --downlevel on prepublish
TheSonOfThomp Apr 4, 2025
af15a4a
adds changesets
TheSonOfThomp Apr 4, 2025
5858fc9
Update InlineCode.tsx
TheSonOfThomp Apr 3, 2025
d1b06fc
update packagejsons
TheSonOfThomp Apr 4, 2025
c1aaa0c
fix prepublishOnly
TheSonOfThomp Apr 4, 2025
153d7a3
update logging
TheSonOfThomp Apr 4, 2025
90b6901
Update build-typescript-5.md
TheSonOfThomp Apr 4, 2025
32ecdd9
fix build build scripts
TheSonOfThomp Apr 4, 2025
c58669d
"tsc": "lg-internal-build-ts"
TheSonOfThomp Apr 4, 2025
2a0f25d
add downlevel to prepublish
TheSonOfThomp Apr 4, 2025
5cde9cb
reset packagejson
TheSonOfThomp Apr 5, 2025
c4917f9
add runTypescriptDownlevel to bin
TheSonOfThomp Apr 5, 2025
7a1967c
Update pnpm-lock.yaml
TheSonOfThomp Apr 5, 2025
68385bc
Update package.json
TheSonOfThomp Apr 5, 2025
03a7c93
update typesVersions
TheSonOfThomp Apr 5, 2025
0ba3188
Update package.json
TheSonOfThomp Apr 5, 2025
830cf8b
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 5, 2025
667e0de
Update package.json
TheSonOfThomp Apr 5, 2025
5af0d92
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 7, 2025
39c072e
lint
TheSonOfThomp Apr 7, 2025
20ad2e0
lint console
TheSonOfThomp Apr 7, 2025
2064f39
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 7, 2025
a3658d6
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 8, 2025
e0a48e3
Update build-ts.spec.ts
TheSonOfThomp Apr 8, 2025
dfbb6fa
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 9, 2025
0ebfad4
Update pnpm-lock.yaml
TheSonOfThomp Apr 9, 2025
65f92fc
add missing mock-fs
TheSonOfThomp Apr 9, 2025
af384a2
@types/mock-fs
TheSonOfThomp Apr 9, 2025
f3139d7
remove TS 3 downleveling
TheSonOfThomp Apr 9, 2025
5fa3672
rm chalk. fix mockFs
TheSonOfThomp Apr 9, 2025
d994c1a
creates updateTypesVersions script
TheSonOfThomp Apr 14, 2025
cfb9da9
exclude packages from ts downlevel script
TheSonOfThomp Apr 14, 2025
b11ab50
remove typesVersions
TheSonOfThomp Apr 14, 2025
9c0e843
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 21, 2025
9c0239b
Create typescript-5-all.md
TheSonOfThomp Apr 21, 2025
48d9603
updates all tsconfigs
TheSonOfThomp Apr 21, 2025
2e15153
Update build-package.ts
TheSonOfThomp Apr 21, 2025
b00a933
updates scripts
TheSonOfThomp Apr 21, 2025
bc7a070
updates downlevel script
TheSonOfThomp Apr 21, 2025
41dad03
comments
TheSonOfThomp Apr 22, 2025
e64560b
T 5.8 (#2816)
TheSonOfThomp Apr 22, 2025
b488bbe
Update build-typescript-5.md
TheSonOfThomp Apr 22, 2025
8da1c85
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 22, 2025
768915e
Update tsconfig.json
TheSonOfThomp Apr 22, 2025
1f6a890
lint fix
TheSonOfThomp Apr 22, 2025
988eed6
Update typescript-5-all.md
TheSonOfThomp Apr 22, 2025
c0d73ba
add --update to bin cmd
TheSonOfThomp Apr 22, 2025
96aa7c3
ensure empty
TheSonOfThomp Apr 22, 2025
06ec702
Create validate-build-package-json.md
TheSonOfThomp Apr 23, 2025
4e4a3b2
Revert "Create validate-build-package-json.md"
TheSonOfThomp Apr 23, 2025
fce55fa
Delete package.json
TheSonOfThomp Apr 23, 2025
eb87087
revert typesversions
TheSonOfThomp Apr 23, 2025
c591660
lockfile
TheSonOfThomp Apr 23, 2025
a01525f
disable downlevel
TheSonOfThomp Apr 23, 2025
160fecb
Merge branch 'main' into a/ts5
TheSonOfThomp Apr 23, 2025
5de5a48
Squashed commit of the following:
TheSonOfThomp Apr 23, 2025
db70c18
updates all TSconfigs
TheSonOfThomp Apr 23, 2025
26da682
adds changesets
TheSonOfThomp Apr 23, 2025
40f18b8
adds types entry point in package.json
TheSonOfThomp Apr 23, 2025
7f7fe79
code postinstall
TheSonOfThomp Apr 23, 2025
b8cf683
fix builds
TheSonOfThomp Apr 23, 2025
ebe5b1f
Update prettier.ts
TheSonOfThomp Apr 23, 2025
1f61c36
update each package's tsconfig
TheSonOfThomp Apr 22, 2025
57e3404
updates `types` source in package.json
TheSonOfThomp Apr 22, 2025
f5cbf13
downlevel 5.0
TheSonOfThomp Apr 22, 2025
0edb9de
use getPackageRoot in build & lint
TheSonOfThomp Apr 23, 2025
9cedcf7
update umd build dir
TheSonOfThomp Apr 23, 2025
672f22f
updates 'main' entry in package.json
TheSonOfThomp Apr 23, 2025
0c71d0b
update build scripts
TheSonOfThomp Apr 23, 2025
b27b2c8
update lint md
TheSonOfThomp Apr 23, 2025
bce74cc
Create build-rollup-umd.md
TheSonOfThomp Apr 23, 2025
5327d4d
Create build-tsconfig-configDir.md
TheSonOfThomp Apr 23, 2025
f1ce25e
update bin
TheSonOfThomp Apr 23, 2025
596df4b
update forgotten tsconfigs
TheSonOfThomp Apr 23, 2025
fb50a43
update tsconfig nodeResolution
TheSonOfThomp Apr 23, 2025
98621ec
Entry Points pre-work [LG-5028] (#2805)
TheSonOfThomp Apr 23, 2025
5c16ec9
rm select/testing entry point
TheSonOfThomp Apr 23, 2025
ad23660
Update icon rollup.config.mjs
TheSonOfThomp Apr 23, 2025
73199a1
revert to node10 for some packages
TheSonOfThomp Apr 9, 2025
694a4df
mv testing dir
TheSonOfThomp Apr 9, 2025
9874c9d
add /testing entry point
TheSonOfThomp Apr 9, 2025
95c1050
fix code ts
TheSonOfThomp Apr 17, 2025
d592512
Update pnpm-lock.yaml
TheSonOfThomp Apr 18, 2025
d468fcd
Update pnpm-lock.yaml
TheSonOfThomp Apr 18, 2025
8884c19
nodenext
TheSonOfThomp Apr 9, 2025
f5a20fe
revert to node10 for some packages
TheSonOfThomp Apr 9, 2025
9bd76fe
update base tsconfig
TheSonOfThomp Apr 17, 2025
20c2944
moves Test Utils to a consistent location
TheSonOfThomp Apr 18, 2025
db2ea8a
fix references & updates package.json files
TheSonOfThomp Apr 18, 2025
e3a2ba3
Update testing-entry-points.md
TheSonOfThomp Apr 21, 2025
b022ad3
Squashed commit of the following:
TheSonOfThomp Apr 23, 2025
51dd5bb
Squashed commit of the following:
TheSonOfThomp Apr 24, 2025
4d4948c
Update pnpm-lock.yaml
TheSonOfThomp Apr 24, 2025
00576e1
Squashed commit of the following:
TheSonOfThomp Apr 25, 2025
e1481df
Squashed commit of the following:
TheSonOfThomp Apr 25, 2025
96bca77
install build as dev dep for every package
TheSonOfThomp Apr 25, 2025
b20ad2f
Update pnpm-lock.yaml
TheSonOfThomp Apr 25, 2025
1308bca
fixes select entry points
TheSonOfThomp Apr 25, 2025
b323d56
Squashed commit of the following:
TheSonOfThomp Apr 28, 2025
f6cd505
Squashed commit of the following:
TheSonOfThomp Apr 28, 2025
3e9a04f
Squashed commit of the following:
TheSonOfThomp Apr 28, 2025
527b95f
Merge branch 'integration/tooling' into a/add-entry-points
TheSonOfThomp Apr 28, 2025
e694ffa
Update pnpm-lock.yaml
TheSonOfThomp Apr 28, 2025
c9f2dcd
Create all-build-dev-dep.md
TheSonOfThomp Apr 28, 2025
5c92415
Update getAllPackages.ts
TheSonOfThomp Apr 29, 2025
6a1fa57
updates testing references
TheSonOfThomp Apr 29, 2025
fc17b70
updates umd/testing dir
TheSonOfThomp Apr 29, 2025
59f142b
date-utils/testing
TheSonOfThomp Apr 29, 2025
82778a6
meta ensureDirSync
TheSonOfThomp Apr 29, 2025
5762b11
Update DatePicker.stories.tsx
TheSonOfThomp Apr 30, 2025
a560dc6
storybook-addon entry points
TheSonOfThomp Apr 30, 2025
5eedc8d
adds verbose logging to build
TheSonOfThomp Apr 30, 2025
668194c
fix esm testing build
TheSonOfThomp Apr 30, 2025
ab3854f
update date-utils/testing
TheSonOfThomp Apr 30, 2025
18c580e
Merge branch 'integration/tooling' into a/add-entry-points
TheSonOfThomp May 1, 2025
6b6470d
fixes new bug in InlineCode
TheSonOfThomp May 1, 2025
15d317a
adds missing @storybook/test
TheSonOfThomp May 1, 2025
26c0ace
Merge branch 'integration/tooling' into a/add-entry-points
TheSonOfThomp May 1, 2025
a9a01b7
lint
TheSonOfThomp May 2, 2025
f7feb37
[test] rm exports from sb-addon
TheSonOfThomp May 9, 2025
ded636a
Revert "[test] rm exports from sb-addon"
TheSonOfThomp May 9, 2025
30c0e8f
wip
TheSonOfThomp May 9, 2025
6b3ee04
update preset
TheSonOfThomp May 12, 2025
6c897ef
Squashed commit of the following:
TheSonOfThomp May 21, 2025
37b3013
Merge branch 'integration/tooling' into a/add-entry-points
TheSonOfThomp May 21, 2025
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
108 changes: 108 additions & 0 deletions .changeset/all-build-dev-dep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
'@lg-chat/leafygreen-chat-provider': patch
'@leafygreen-ui/leafygreen-provider': patch
'@leafygreen-ui/confirmation-modal': patch
'@leafygreen-ui/gallery-indicator': patch
'@leafygreen-ui/inline-definition': patch
'@leafygreen-ui/loading-indicator': patch
'@leafygreen-ui/segmented-control': patch
'@lg-tools/storybook-decorators': patch
'@leafygreen-ui/expandable-card': patch
'@leafygreen-ui/marketing-modal': patch
'@leafygreen-ui/radio-box-group': patch
'@leafygreen-ui/skeleton-loader': patch
'@leafygreen-ui/password-input': patch
'@lg-charts/series-provider': patch
'@lg-chat/fixed-chat-window': patch
'@leafygreen-ui/info-sprinkle': patch
'@lg-chat/message-feedback': patch
'@leafygreen-ui/input-option': patch
'@leafygreen-ui/number-input': patch
'@leafygreen-ui/ordered-list': patch
'@leafygreen-ui/search-input': patch
'@leafygreen-ui/split-button': patch
'@lg-tools/storybook-addon': patch
'@lg-tools/storybook-utils': patch
'@lg-charts/drag-provider': patch
'@lg-chat/chat-disclaimer': patch
'@lg-chat/message-prompts': patch
'@leafygreen-ui/date-picker': patch
'@leafygreen-ui/descendants': patch
'@leafygreen-ui/empty-state': patch
'@leafygreen-ui/form-footer': patch
'@leafygreen-ui/icon-button': patch
'@leafygreen-ui/polymorphic': patch
'@leafygreen-ui/radio-group': patch
'@leafygreen-ui/testing-lib': patch
'@lg-tools/test-harnesses': patch
'@lg-chat/message-rating': patch
'@leafygreen-ui/date-utils': patch
'@leafygreen-ui/form-field': patch
'@leafygreen-ui/pagination': patch
'@leafygreen-ui/text-input': patch
'@leafygreen-ui/typography': patch
'@leafygreen-ui/guide-cue': patch
'@leafygreen-ui/text-area': patch
'@lg-charts/chart-card': patch
'@lg-chat/message-feed': patch
'@leafygreen-ui/checkbox': patch
'@leafygreen-ui/combobox': patch
'@leafygreen-ui/copyable': patch
'@leafygreen-ui/pipeline': patch
'@leafygreen-ui/side-nav': patch
'@lg-chat/chat-window': patch
'@lg-chat/lg-markdown': patch
'@leafygreen-ui/callout': patch
'@leafygreen-ui/emotion': patch
'@leafygreen-ui/palette': patch
'@leafygreen-ui/popover': patch
'@leafygreen-ui/stepper': patch
'@leafygreen-ui/tooltip': patch
'@lg-chat/rich-links': patch
'@leafygreen-ui/avatar': patch
'@leafygreen-ui/banner': patch
'@leafygreen-ui/button': patch
'@leafygreen-ui/drawer': patch
'@leafygreen-ui/portal': patch
'@leafygreen-ui/ripple': patch
'@leafygreen-ui/select': patch
'@leafygreen-ui/toggle': patch
'@leafygreen-ui/tokens': patch
'@lg-chat/input-bar': patch
'@lg-chat/title-bar': patch
'@leafygreen-ui/badge': patch
'@leafygreen-ui/hooks': patch
'@leafygreen-ui/modal': patch
'@leafygreen-ui/table': patch
'@leafygreen-ui/toast': patch
'@lg-tools/codemods': patch
'@lg-tools/slackbot': patch
'@lg-tools/validate': patch
'@lg-charts/colors': patch
'@lg-charts/legend': patch
'@leafygreen-ui/a11y': patch
'@leafygreen-ui/card': patch
'@leafygreen-ui/chip': patch
'@leafygreen-ui/code': patch
'@leafygreen-ui/icon': patch
'@leafygreen-ui/logo': patch
'@leafygreen-ui/menu': patch
'@leafygreen-ui/tabs': patch
'@lg-tools/install': patch
'@lg-chat/message': patch
'@leafygreen-ui/box': patch
'@leafygreen-ui/lib': patch
'@lg-tools/create': patch
'@lg-tools/update': patch
'@lg-charts/core': patch
'@lg-chat/avatar': patch
'@lg-tools/build': patch
'@lg-tools/link': patch
'@lg-tools/lint': patch
'@lg-tools/meta': patch
'@lg-tools/test': patch
'@lg-tools/cli': patch
'lg-scripts': patch
---

Adds `@lg-tools/build` as a dev dependency
1 change: 0 additions & 1 deletion .changeset/build-tsconfig-bundler.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
---

Updates `package.tsconfig.json` "moduleResolution" to "bundler", and "target" to "ES2020"

2 changes: 1 addition & 1 deletion .changeset/build-tsconfig-configDir.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
---

- Updates default types directory to `./dist/types`
- Uses "${configDir}" in base package.json baseUrl, rootDir, outDir, & declarationDir properties
- Uses "${configDir}" in base package.json baseUrl, rootDir, outDir, & declarationDir properties
5 changes: 5 additions & 0 deletions .changeset/lint-update-ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lg-tools/lint': patch
---

Updates `typescript` peerDepedency to v5.8
24 changes: 24 additions & 0 deletions .changeset/testing-entry-points.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@leafygreen-ui/code': major
'@leafygreen-ui/gallery-indicator': major
'@leafygreen-ui/select': major
'@leafygreen-ui/table': major
'@leafygreen-ui/tabs': major
'@leafygreen-ui/text-area': major
'@leafygreen-ui/text-input': major
'@leafygreen-ui/toggle': major
---
Adds code splitting for test utilities
- Adds `/testing` entry point
- Removes `getTestUtils` from main bundle entry point

When using the component, testing utilities won't be included into your final bundle
```tsx
// App.tsx
import { Component } from `@leafygreen-ui/<package>`
```

Testing utilities (and their dependencies) will only be imported if you import them explicitly
```tsx
import { getTestUtils } from `@leafygreen-ui/<package>/testing`
```
10 changes: 2 additions & 8 deletions charts/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@lg-tools/build/config/package.tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"paths": {
"@leafygreen-ui/icon/dist/*": [
"../../packages/icon/src/generated/*"
Expand All @@ -11,13 +10,8 @@
]
}
},
"include": [
"src/**/*"
],
"exclude": [
"**/*.spec.*",
"**/*.stories.*"
],
"include": ["src/**/*"],
"exclude": ["**/*.spec.*", "**/*.stories.*"],
"references": [
{
"path": "../chart-card"
Expand Down
3 changes: 2 additions & 1 deletion chat/chat-disclaimer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"devDependencies": {
"@leafygreen-ui/button": "workspace:^",
"@leafygreen-ui/modal": "workspace:^"
"@leafygreen-ui/modal": "workspace:^",
"@lg-tools/build": "workspace:^"
},
"homepage": "https://github.com/mongodb/leafygreen-ui/tree/main/packages/chat-disclaimer",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion chat/chat-window/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
"@lg-chat/input-bar": "workspace:^",
"@lg-chat/message": "workspace:^",
"@lg-chat/message-feed": "workspace:^",
"@lg-chat/message-feedback": "workspace:^",
"@lg-chat/message-prompts": "workspace:^",
"@lg-chat/message-feedback": "workspace:^"
"@lg-tools/build": "workspace:^"
},
"peerDependencies": {
"@leafygreen-ui/leafygreen-provider": "workspace:^"
Expand Down
3 changes: 2 additions & 1 deletion chat/fixed-chat-window/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
"@lg-chat/leafygreen-chat-provider": "workspace:^",
"@lg-chat/message": "workspace:^",
"@lg-chat/message-feed": "workspace:^",
"@lg-chat/message-feedback": "workspace:^",
"@lg-chat/message-prompts": "workspace:^",
"@lg-chat/message-feedback": "workspace:^"
"@lg-tools/build": "workspace:^"
},
"peerDependencies": {
"@leafygreen-ui/leafygreen-provider": "workspace:^"
Expand Down
4 changes: 3 additions & 1 deletion chat/input-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@
"@leafygreen-ui/leafygreen-provider": "workspace:^",
"@lg-chat/leafygreen-chat-provider": "workspace:^"
},
"devDependencies": {}
"devDependencies": {
"@lg-tools/build": "workspace:^"
}
}
4 changes: 3 additions & 1 deletion chat/lg-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@
"peerDependencies": {
"@leafygreen-ui/leafygreen-provider": "workspace:^"
},
"devDependencies": {}
"devDependencies": {
"@lg-tools/build": "workspace:^"
}
}
2 changes: 0 additions & 2 deletions chat/lg-markdown/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"extends": "@lg-tools/build/config/package.tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",

"paths": {
"@leafygreen-ui/icon/dist/*": [
"../../packages/icon/src/generated/*"
Expand Down
3 changes: 2 additions & 1 deletion chat/message-feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"devDependencies": {
"@leafygreen-ui/typography": "workspace:^",
"@lg-chat/chat-disclaimer": "workspace:^",
"@lg-chat/message-prompts": "workspace:^"
"@lg-chat/message-prompts": "workspace:^",
"@lg-tools/build": "workspace:^"
},
"peerDependencies": {
"@leafygreen-ui/leafygreen-provider": "workspace:^",
Expand Down
3 changes: 2 additions & 1 deletion chat/message-feedback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"@leafygreen-ui/typography": "workspace:^"
},
"devDependencies": {
"@lg-chat/message-rating": "workspace:^"
"@lg-chat/message-rating": "workspace:^",
"@lg-tools/build": "workspace:^"
},
"peerDependencies": {
"@leafygreen-ui/leafygreen-provider": "workspace:^"
Expand Down
3 changes: 2 additions & 1 deletion chat/message/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
},
"devDependencies": {
"@lg-chat/avatar": "workspace:^",
"@lg-chat/message-feedback": "workspace:^"
"@lg-chat/message-feedback": "workspace:^",
"@lg-tools/build": "workspace:^"
},
"peerDependencies": {
"@leafygreen-ui/leafygreen-provider": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"chromatic": "npx chromatic",
"clean": "npm-run-all --parallel clean:*",
"clean:builds": "pnpm recursive exec -- rm -rf ./{dist,tsconfig.tsbuildinfo,stories.js}",
"clean:ts": "pnpm recursive exec -- rm -rf ./{dist/**/*.d.ts.,tsconfig.tsbuildinfo}",
"clean:cache": "pnpm recursive exec -- rm -rf ./.turbo; rm -rf .turbo/cache",
"clean:modules": "pnpm recursive exec -- rm -rf node_modules; rm -rf node_modules",
"fix": "lg lint --fix",
Expand Down
1 change: 0 additions & 1 deletion packages/box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"publishConfig": {
"access": "public"
},
"dependencies": {},
"homepage": "https://github.com/mongodb/leafygreen-ui/tree/main/packages/box",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion packages/callout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"@leafygreen-ui/typography": "workspace:^"
},
"devDependencies": {
"@leafygreen-ui/code": "workspace:^"
"@leafygreen-ui/code": "workspace:^",
"@lg-tools/build": "workspace:^"
},
"peerDependencies": {
"@leafygreen-ui/leafygreen-provider": "workspace:^"
Expand Down
4 changes: 3 additions & 1 deletion packages/chip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@
"bugs": {
"url": "https://jira.mongodb.org/projects/PD/summary"
},
"devDependencies": {}
"devDependencies": {
"@lg-tools/build": "workspace:^"
}
}
12 changes: 12 additions & 0 deletions packages/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"typesVersions": {},
"exports": {
".": {
"require": "./dist/umd/index.js",
"import": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts"
},
"./testing": {
"require": "./dist/umd/testing/index.js",
"import": "./dist/esm/testing/index.js",
"types": "./dist/types/testing/index.d.ts"
}
},
"scripts": {
"build": "lg-build bundle",
"tsc": "lg-build tsc",
Expand Down
8 changes: 4 additions & 4 deletions packages/code/src/Code/Code.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import Icon from '@leafygreen-ui/icon';
import IconButton from '@leafygreen-ui/icon-button';
import { Context, jest as Jest } from '@leafygreen-ui/testing-lib';

import { numOfCollapsedLinesOfCode } from '../constants';
import { Panel } from '../Panel';
import { getTestUtils } from '../testing';
import {
languageOptions,
renderCode,
renderCodeWithLanguageSwitcher,
} from '../Code.testutils';
import { numOfCollapsedLinesOfCode } from '../constants';
import { Panel } from '../Panel';
import { getTestUtils } from '../utils/getTestUtils/getTestUtils';
} from '../testing/Code.testutils';

import Code from './Code';
import { hasMultipleLines } from './utils';
Expand Down
7 changes: 1 addition & 6 deletions packages/code/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ export type { LanguageOption } from './Panel/Panel.types';
export type { SyntaxProps } from './Syntax/Syntax.types';
export type { LineHighlightingDefinition } from './types';
export { Language } from './types';
export {
getLgIds,
type GetLgIdsReturnType,
getTestUtils,
type TestUtilsReturnType,
} from './utils';
export { getLgIds, type GetLgIdsReturnType } from './utils';

export default Code;
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import React from 'react';
import { render, RenderResult } from '@testing-library/react';

import Code from './Code/Code';
import { CodeProps } from './Code/Code.types';
import { PanelProps } from './Panel/Panel.types';
import { Panel } from './Panel';
import { Language } from './types';
import { getTestUtils, TestUtilsReturnType } from './utils';
import Code from '../Code/Code';
import { CodeProps } from '../Code/Code.types';
import { Panel } from '../Panel';
import { PanelProps } from '../Panel/Panel.types';
import { Language } from '../types';

import { getTestUtils } from './getTestUtils';
import type { TestUtilsReturnType } from './getTestUtils.types';

const codeSnippet = `
import datetime from './';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
renderCode,
renderCodeWithLanguageSwitcher,
renderMultipleCodes,
} from '../../Code.testutils';

} from './Code.testutils';
import { getTestUtils } from './getTestUtils';

describe('packages/tabs/getTestUtils', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { getByLgId, queryBySelector } from '@lg-tools/test-harnesses';

import { getTestUtils as getButtonTestUtils } from '@leafygreen-ui/button';
import { getTestUtils as getSelectTestUtils } from '@leafygreen-ui/select';
import { getTestUtils as getSelectTestUtils } from '@leafygreen-ui/select/testing';

import { DEFAULT_LGID_ROOT, getLgIds } from '../getLgIds';
import { DEFAULT_LGID_ROOT, getLgIds } from '../utils/getLgIds';

import { TestUtilsReturnType } from './getTestUtils.types';

Expand Down
Loading
Loading