-
Notifications
You must be signed in to change notification settings - Fork 163
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
fix: TypeScript exports in package.json #461
fix: TypeScript exports in package.json #461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the syntax here is correct for a fix. Does this work locally?
As a workaround, you can use the following import:
import { getTestServer } from "@google-cloud/functions-framework/build/src/testing";
".": "./build/src/index.js", | ||
"./testing": "./build/src/testing.js" | ||
".": { | ||
"types": "./build/src/index.d.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think "types"
is valid here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a "community condition definition" https://nodejs.org/api/packages.html#community-conditions-definitions
@grant it works with at least the TypeScript version |
Running into what might be a related issue with:
This is with a fresh |
6d92c32
to
6e2fd8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems fine. We can go with it and revert if needed.
🤖 I have created a release *beep* *boop* --- ## [3.1.2](v3.1.1...v3.1.2) (2022-06-06) ### Bug Fixes * TypeScript exports in package.json ([#461](#461)) ([3596068](3596068)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
I'm still getting import { getTestServer } from '@google-cloud/functions-framework/testing' when |
Ref microsoft/TypeScript#33079