Skip to content

Conversation

@commiterate
Copy link

Relates to #2601.

vsce migrated to @vscode/vsce starting with 2.16.0.

microsoft/vscode-vsce@0383324

@commiterate
Copy link
Author

@microsoft-github-policy-service agree company="NVIDIA"

@commiterate
Copy link
Author

Looks like that bumped some other ESLint deps which don't like some of the require("{module}") statements. Need to switch those to the ESM import syntax.

@commiterate commiterate changed the title Bump vsce from 2.15.0 to 2.32.0 Bump vsce from 2.15.0 to 2.32.0, switch TS to ESM import when possible Oct 9, 2025
@commiterate
Copy link
Author

commiterate commented Oct 9, 2025

Moved as many remaining imports using CJS syntax (require("module")) to ESM syntax. The only one I didn't touch is this since I'm not too sure what to do with it:

https://github.com/Azure/Azurite/blob/v3.35.0/src/common/utils/utils.ts#L8-L10

@commiterate
Copy link
Author

commiterate commented Oct 9, 2025

Hmm npm run test:table is failing for me locally on Ubuntu 24.04 + Node.js 22 due to the CORS tests.

  446 passing (6s)
  1 pending
  4 failing

  1) table Entity APIs test
       Service with mismatching cors rules should response header Vary @loki:

      AssertionError [ERR_ASSERTION]: false == true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/table/auth/tableCorsRequest.test.ts:494:12)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)

  2) table Entity APIs test
       Request Match rule exists that allows all origins (*) @loki:

      AssertionError [ERR_ASSERTION]: false == true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/table/auth/tableCorsRequest.test.ts:527:12)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)

  3) table Entity APIs test
       Request Match rule exists for exact origin @loki:

      AssertionError [ERR_ASSERTION]: false == true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/table/auth/tableCorsRequest.test.ts:564:12)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)

  4) table Entity APIs test
       Request Match rule in sequence @loki:

      AssertionError [ERR_ASSERTION]: false == true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (tests/table/auth/tableCorsRequest.test.ts:646:12)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)

Since none of the CORS logic on Azurite's side changed, it seems like the VSCE bump pulling in a newer @azure/core-client is breaking these tests.

@commiterate
Copy link
Author

This is also a bit awkward because some of the updated Azure SDK packages now declare Node.js 20 as a minimum, so the Node.js 16 tests will fail. That means we need #2568 first to drop Node.js 16.

@commiterate
Copy link
Author

commiterate commented Oct 9, 2025

It's this commit for @azure/core-client which strips unknown headers from responses when deserializing.

Azure/azure-sdk-for-js@5e0ed69

It's first included in the @azure/core-client_1.7.1 Git tag for the various @azure/core-client_{version} Git tags.

Since bumping VSCE to 2.32.0 also bumps @azure/core-client from 1.5.0 to 1.10.1, the Vary header these CORS tests check for no longer exists since it's being stripped out by the deserializer.

Switching the operation options to stop ignoring unknown properties doesn't help either.

serviceClientWithOrigin.getProperties({
    serializerOptions: {
        ignoreUnknownProperties: false,
        xml: {}
    }
})

@blueww @EmmaZhu Am I good to remove these 4 CORS unit tests?

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.

1 participant