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

fix: compatability with verbatimModuleSyntax #115

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LoaderB0T
Copy link

@LoaderB0T LoaderB0T commented Aug 21, 2024

Fixes: #114

This PR extends the Dependency class & text generator to generate the import statement with the "type" keyword when the imported symbol is a type or interface.

This required typescript 3.8 or later, so this might be a breaking change.

EDIT:

I also had to update the prettier version because the old version did not know the "type" keyword in that context.

@LoaderB0T
Copy link
Author

Additional comment: I was not able to execute any of the tests locally as I get various errors trying the commands.

For example when I just run the "test" or "test:lib:protoc-gen-ng" commands I get:

● Validation Error:

  Directory C:\git_repos\ngx-grpc\packages\protoc-gen-ng\test\out in the roots[1] option was not found.

  Configuration Documentation:
  https://jestjs.io/docs/configuration

ERROR: "test:lib:protoc-gen-ng" exited with 1.

and when I try test:lib:protoc-gen-ng:generate I get:


> test:lib:protoc-gen-ng:generate
> cd packages/protoc-gen-ng && mkdir -p ./test/out && rimraf ./test/out/* && $(pwd)/../../node_modules/.bin/grpc_tools_node_protoc --plugin=protoc-gen-ng=$(pwd)/../../dist/protoc-gen-ng/main.js --ng_out=config=./ngx-grpc.conf.js:./test/out -I test/proto $(find test/proto -iname "*.proto")

The syntax of the command is incorrect.

I ran all commands in WSL ubuntu 22.04.1

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.

Incompatability with verbatimModuleSyntax
1 participant