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

feat: update to latest mongosh, driver, and segment analytics VSCODE-366 #494

Merged

Conversation

alenakhineika
Copy link
Contributor

@alenakhineika alenakhineika commented Mar 20, 2023

Description

Update to:

  • mongosh@^1.8.0
  • mongodb@^5.1.0
  • bson@^5.1.0
  • mongodb-schema@^10.0.1
  • analytics-node@^6.2.0
  • vscode engines @ ^1.76.2

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@alenakhineika alenakhineika marked this pull request as ready for review March 20, 2023 16:26
Copy link
Member

@Anemy Anemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, left a question and a comment on _id types that might not be ObjectIds.

src/editors/mongoDBDocumentService.ts Outdated Show resolved Hide resolved
src/editors/mongoDBDocumentService.ts Outdated Show resolved Hide resolved
src/explorer/documentTreeItem.ts Outdated Show resolved Hide resolved
@@ -16,6 +16,9 @@ const baseConfig = {

const extensionConfig = {
...baseConfig,
experiments: {
topLevelAwait: true,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using this anywhere? What's the motivation for this change? I'm just curious, looks good either way.

Copy link
Contributor Author

@alenakhineika alenakhineika Mar 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something changed in the bson library I believe that requires a top-level await, so the extension crashed on startup with the error:

2023-03-20 18:06:02.608 [error] Activating extension mongodb.mongodb-vscode failed due to an error:
2023-03-20 18:06:02.608 [error] Error: Module parse failed: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
Error: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
    at /Users/alena.khineika/www/vscode/node_modules/webpack/lib/dependencies/HarmonyDetectionParserPlugin.js:54:11
    at Hook.eval [as call] (eval at create (/Users/alena.khineika/www/vscode/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:16)
    ...
    at ./node_modules/bson/lib/bson.mjs (/Users/alena.khineika/www/vscode/dist/extension.js:90406:7)
    at __webpack_require__ (/Users/alena.khineika/www/vscode/dist/extension.js:336777:43)

@alenakhineika alenakhineika requested a review from Anemy March 20, 2023 18:46
@alenakhineika alenakhineika merged commit 833a24f into main Mar 21, 2023
@alenakhineika alenakhineika deleted the VSCODE-3660-update-to-latest-mongosh-driver-analytics branch March 21, 2023 11:53
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.

2 participants