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

Release 1.1.0 #308

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Release 1.1.0 #308

merged 3 commits into from
Dec 14, 2023

Conversation

paul-sachs
Copy link
Collaborator

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

What's Changed

CJS output

By default, protoc-gen-connect-query (and all other plugins based on @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:

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

@paul-sachs
Copy link
Collaborator Author

Wasn't sure if we would include the changes to fix imports in create-react-app (ie, the import extensions) as externally visible changes. It's not an API change but it does fix compat for some bundlers.

@nicksnyder
Copy link
Member

Added support for cjs output by

This feels like a feature so wouldn't a version of 1.1.0 be more appropriate?

@paul-sachs
Copy link
Collaborator Author

@nicksnyder ah, yeah that's fair.

@paul-sachs paul-sachs changed the title Release 1.0.1 Release 1.1.0 Dec 14, 2023
@timostamm
Copy link
Member

Missed it earlier, sorry, but can we add js_import_style to the ToC of the plugin readme?

@paul-sachs
Copy link
Collaborator Author

@timostamm Yep, added here: #309.

@paul-sachs paul-sachs merged commit 02fde5c into main Dec 14, 2023
5 checks passed
@paul-sachs paul-sachs deleted the psachs/release-v1.0.1 branch December 14, 2023 18:01
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.

3 participants