Skip to content

release-1.x triggers DEP0128 in test suite #1975

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

Closed
cjihrig opened this issue Oct 25, 2024 · 2 comments
Closed

release-1.x triggers DEP0128 in test suite #1975

cjihrig opened this issue Oct 25, 2024 · 2 comments

Comments

@cjihrig
Copy link
Contributor

cjihrig commented Oct 25, 2024

Describe the bug
When running the test suite on the release-1.x branch, Node's DEP0128 deprecation warning is emitted. This happens because src/gen/package.json points to an invalid main file. This deprecation was originally documented in Node 12, and moved to a runtime deprecation in Node 16. In the future, this will cause the test suite to throw exceptions. Since the deprecation has been in place for a while, it's feasible that Node will move in that direction in an upcoming major release.

There are a few things that can be done here:

  • Fix the generation process to create a correct main field.
  • Delete the problematic package.json file. It is already not published, but it might be useful for seeing the information in the file.
  • Run the test suite against the transpiled code which does not have the problem. This has the benefit of testing against the code that is actually published to npm.

In the future it might be worth running the test suite with the --throw-deprecation flag set as well.

Client Version
Latest release-1.x branch.

Server Version
N/A

To Reproduce
Steps to reproduce the behavior:
Run npm test on the release-1.x branch.

Expected behavior
The test suite does not generate any deprecation warnings.

Example Code
npm test

Environment (please complete the following information):

  • OS: N/A
  • NodeJS Version all currently supported versions
  • Cloud runtime N/A

Additional context
This only impacts the test suite, as the problematic package.json file is not published.

@brendandburns
Copy link
Contributor

I think deleting the package.json is probably the right way to do it, we'll need to modify the generate scripts. That file is generated by the code generator, I don't think that it is super useful.

@mstruebing
Copy link
Member

Closed by: #1980

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

No branches or pull requests

3 participants