Skip to content

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

@cjihrig

Description

@cjihrig

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions