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

feat!: move server to sub-module export #155

Merged
merged 2 commits into from Mar 6, 2024
Merged

Conversation

eduardoboucas
Copy link
Member

Which problem is this pull request solving?

Moves the local server to a sub-module export. This means that the way the BlobsServer class is imported has changed:

-import { BlobsServer } from "@netlify/blobs"
+import { BlobsServer } from "@netlify/blobs/server"

const server = new BlobsServer()

BREAKING CHANGE: The `BlobsServer` class is no longer available in the main package export
@eduardoboucas eduardoboucas requested a review from a team as a code owner March 6, 2024 16:41
@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Mar 6, 2024
Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for blobs-js ready!

Name Link
🔨 Latest commit 5b34e03
🔍 Latest deploy log https://app.netlify.com/sites/blobs-js/deploys/65e89ea9463e61000888d5c1
😎 Deploy Preview https://deploy-preview-155--blobs-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ascorbic
Copy link
Member

ascorbic commented Mar 6, 2024

It would be good to add a server.d.ts in the root that just re-exports from dist. Otherwise sites that use moduleResolution: node will have trouble resolving the types.

@eduardoboucas
Copy link
Member Author

It would be good to add a server.d.ts in the root that just re-exports from dist. Otherwise sites that use moduleResolution: node will have trouble resolving the types.

Good call. Done in 5b34e03.

Copy link
Member

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

Thanks! As an aside, I am a big fan of using @arethetypeswrong/cli and publint in CI. The former would have complained about the missing root subpath export.

@eduardoboucas eduardoboucas merged commit 4bcfeff into main Mar 6, 2024
8 checks passed
@eduardoboucas eduardoboucas deleted the feat/server-sub-module branch March 6, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants