Skip to content

fix: warning from use of context.importAssertions #179

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

Merged
merged 3 commits into from
Feb 28, 2025
Merged

fix: warning from use of context.importAssertions #179

merged 3 commits into from
Feb 28, 2025

Conversation

mohd-akram
Copy link
Contributor

A warning is printed when using context.importAssertions instead of context.importAttributes since Node.js v21.0.0, v20.10.0 and v18.19.0.

Fixes #172

A warning is printed when using context.importAssertions instead of
context.importAttributes since Node.js v21.0.0, v20.10.0 and v18.19.0.
@mohd-akram
Copy link
Contributor Author

@timfish Thoughts on this? CI failure is unrelated

@timfish
Copy link
Contributor

timfish commented Feb 24, 2025

What makes you think the CI failures are unrelated? I just re-ran them and they still fail.

@mohd-akram
Copy link
Contributor Author

@timfish The same failure has been happening in the main branch starting since CI #1498. Something to do with the openai module:

    ReferenceError: ChatCompletionStoreMessagesPage is not defined
        at Function.assign (<anonymous>)
        at file:///home/runner/work/import-in-the-middle/import-in-the-middle/node_modules/openai/resources/chat/completions/messages.mjs?iitm=true:6:18
        at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
        at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
        at async file:///home/runner/work/import-in-the-middle/import-in-the-middle/test/register/v18.19-exclude.mjs:13:1

@timfish
Copy link
Contributor

timfish commented Feb 25, 2025

Ah, well we need to fix this before we can merge any PRs because it's stopping the complete test suite from running!

@mohd-akram
Copy link
Contributor Author

Issue seems to have been introduced with openai v4.85.0

@timfish timfish merged commit 8e56cf1 into nodejs:main Feb 28, 2025
48 checks passed
@mohd-akram mohd-akram deleted the fix-warning branch February 28, 2025 15:18
mydea added a commit to getsentry/sentry-javascript that referenced this pull request May 12, 2025
mydea added a commit to getsentry/sentry-javascript that referenced this pull request May 12, 2025
See
https://github.com/nodejs/import-in-the-middle/releases/tag/import-in-the-middle-v1.13.1

### Bug Fixes

* handling of circular dependencies
([#181](nodejs/import-in-the-middle#181))
([b58092e](nodejs/import-in-the-middle@b58092e))
* importing JSON files
([#182](nodejs/import-in-the-middle#182))
([8c52014](nodejs/import-in-the-middle@8c52014))
* warning from use of context.importAssertions
([#179](nodejs/import-in-the-middle#179))
([8e56cf1](nodejs/import-in-the-middle@8e56cf1))

This version is already allowed by our range, but in order to ensure
everybody gets this, bumping it here.
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.

importAssertions is deprecated from node 22.12
3 participants