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

Missed adding .js to a few files #307

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

paul-sachs
Copy link
Collaborator

@paul-sachs paul-sachs commented Dec 14, 2023

Fixes #298 (again)

Missed another file. All these will automatically be caught once #186 is merged.

@paul-sachs paul-sachs merged commit 998e03f into main Dec 14, 2023
7 checks passed
@paul-sachs paul-sachs deleted the psachs/fix-one-more-extension-issue branch December 14, 2023 16:22
@paul-sachs paul-sachs mentioned this pull request Dec 14, 2023
paul-sachs added a commit that referenced this pull request Dec 14, 2023
## What's Changed
* Update imports to include file extensions by @paul-sachs in
#299 and
#307
* Added support for cjs output by @paul-sachs in
#303
* Loosen peer dependency requirement by @paul-sachs in
#306

## CJS output

By default,
[protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query)
(and all other plugins based on
[@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin))
generate ECMAScript `import` and `export` statements. For use cases
where CommonJS is difficult to avoid, a new plugin option has been added
named `js_import_style` which can be used to generate CommonJS
`require()` calls.

Here is an example
[buf.gen.yaml](https://buf.build/docs/configuration/v1/buf-gen-yaml):

```yaml
version: v1
plugins:
  # You'll need @bufbuild/protoc-gen-es v1.6.0 or later
  - plugin: es
    out: src/gen
    opt: js_import_style=legacy_commonjs
  - plugin: protoc-gen-connect-query
    out: src/gen
    opt: js_import_style=legacy_commonjs
```

To view the full PR, see **Added support for cjs output** by @paul-sachs
in #303

**Full Changelog**:
v1.0.0...v1.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with @connectrpc/connect-query: Module not found: Error: Can't resolve './use-transport'
2 participants