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

Use submodules instead of exported namespaces in @wuespace/telestion #416

Conversation

pklaschka
Copy link
Member

Previously, anything that wasn't exported on the root level of the @wuespace/telestion library had to be imported indirectly through namespaces:

import { utils } from '@wuespace/telestion';
const { wait } = utils;

This didn't provide a great developer experience, as imports couldn't be reoslved automatically.

Instead, these features now must be imported using submodules / path imports:

import { wait } from '@wuespace/telestion/utils';

As of the time of this change, a total of six of these modules exist:

  • @wuespace/telestion/application, corresponding to import { application } from '@wuespace/telestion'
  • @wuespace/telestion/auth, corresponding to import { auth } from '@wuespace/telestion'
  • @wuespace/telestion/nats, corresponding to import { nats } from '@wuespace/telestion'
  • @wuespace/telestion/user-data, corresponding to import { userData } from '@wuespace/telestion'
  • @wuespace/telestion/utils, corresponding to import { utils } from '@wuespace/telestion'
  • @wuespace/telestion/widget, corresponding to import { widget } from '@wuespace/telestion'

The previous namespaces were removed.

Copy link
Member Author

pklaschka commented Jan 12, 2024

@pklaschka pklaschka force-pushed the 01-12-Use_submodules_instead_of_exported_namespaces_in_wuespace/telestion_ branch from 6e8f9ce to 229af07 Compare January 12, 2024 17:45
@pklaschka pklaschka self-assigned this Jan 12, 2024
@pklaschka pklaschka force-pushed the 01-12-Use_submodules_instead_of_exported_namespaces_in_wuespace/telestion_ branch from 229af07 to 18d4d9d Compare January 12, 2024 17:46
@pklaschka pklaschka added 📕 documentation Improvements or additions to documentation 🌷 enhancement New feature or request labels Jan 12, 2024 — with Graphite App
@pklaschka pklaschka force-pushed the 01-12-Use_submodules_instead_of_exported_namespaces_in_wuespace/telestion_ branch from 18d4d9d to f4dbb50 Compare January 12, 2024 17:48
Base automatically changed from 01-12-TELESTION-450_Re-export_NATS_for_convenience to main January 17, 2024 15:51
Copy link
Member

@fussel178 fussel178 left a comment

Choose a reason for hiding this comment

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

LGTM 🍔

Previously, anything that wasn't exported on the root level of the `@wuespace/telestion` library had to be imported indirectly through namespaces:

```ts
import { utils } from '@wuespace/telestion';
const { wait } = utils;
```

This didn't provide a great developer experience, as imports couldn't be reoslved automatically.

Instead, these features now must be imported using submodules / path imports:

```ts
import { wait } from '@wuespace/telestion/utils';
```

As of the time of this change, a total of six of these modules exist:
- `@wuespace/telestion/application`, corresponding to `import { application } from '@wuespace/telestion'`
- `@wuespace/telestion/auth`, corresponding to `import { auth } from '@wuespace/telestion'`
- `@wuespace/telestion/nats`, corresponding to `import { nats } from '@wuespace/telestion'`
- `@wuespace/telestion/user-data`, corresponding to `import { userData } from '@wuespace/telestion'`
- `@wuespace/telestion/utils`, corresponding to `import { utils } from '@wuespace/telestion'`
- `@wuespace/telestion/widget`, corresponding to `import { widget } from '@wuespace/telestion'`

The previous namespaces were removed.
@pklaschka pklaschka force-pushed the 01-12-Use_submodules_instead_of_exported_namespaces_in_wuespace/telestion_ branch from f4dbb50 to 7827a43 Compare January 17, 2024 17:47
@pklaschka pklaschka merged commit d26f1e7 into main Jan 17, 2024
25 checks passed
@pklaschka pklaschka deleted the 01-12-Use_submodules_instead_of_exported_namespaces_in_wuespace/telestion_ branch January 17, 2024 17:47
Copy link
Member Author

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📕 documentation Improvements or additions to documentation 🌷 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants