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

Update "@rollup/plugin-commonjs" to ^11.1.0 #9074

Closed
wants to merge 5 commits into from

Conversation

HarshaNalluru
Copy link
Member

@HarshaNalluru HarshaNalluru commented May 21, 2020

Updates to @rollup/plugin-common-js is causing build failures.

1. Issue of the circular references - Fixed

  • Circular dependency from "nock" library is causing the build to fail since we deliberately throw errors if circular references are present through rollup from storage libraries.
    [!] Error: Circular dependency: ../../../common/temp/node_modules/.pnpm/registry.npmjs.org/nock/11.9.1/node_modules/nock/lib/intercept.js -> ../../../common/temp/node_modules/.pnpm/registry.npmjs.org/nock/11.9.1/node_modules/nock/lib/interceptor.js -> ../../../common/temp/node_modules/.pnpm/registry.npmjs.org/nock/11.9.1/node_modules/nock/lib/intercept.js
    Error: Circular dependency: ../../../common/temp/node_modules/.pnpm/registry.npmjs.org/nock/11.9.1/node_modules/nock/lib/intercept.js -> ../../../common/temp/node_modules/.pnpm/registry.npmjs.org/nock/11.9.1/node_modules/nock/lib/interceptor.js -> ../../../common/temp/node_modules/.pnpm/registry.npmjs.org/nock/11.9.1/node_modules/nock/lib/intercept.js
        at Object.onwarn (/home/vsts/work/1/s/sdk/storage/storage-queue/rollup.test.config.js:56:15)
        at Object.config.onwarn.warning [as onwarn] (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/rollup/1.32.1/node_modules/rollup/dist/shared/node-entry.js:13599:25)
        at Graph.config.onwarn.warning [as onwarn] (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/rollup/1.32.1/node_modules/rollup/dist/shared/node-entry.js:13599:25)
        at Graph.warn (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/rollup/1.32.1/node_modules/rollup/dist/shared/node-entry.js:13403:14)
        at Graph.link (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/rollup/1.32.1/node_modules/rollup/dist/shared/node-entry.js:13420:18)
        at Promise.all.then (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/rollup/1.32.1/node_modules/rollup/dist/shared/node-entry.js:13286:18)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:189:7)
  • Solution: Whitelisting all non-@azure packages - ec125d6

2. Issues caused by dynamic requires - Fixed

Error: Dynamic requires are not currently supported by @rollup/plugin-commonjs

3. [WIP] TypeError from the "nock" library

  • "mocha" fails to run the test bundle because of a TypeError from the "nock" library.
     2020-05-21T23:08:15.9174484Z mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 120000 dist-test/index.node.js 
     2020-05-21T23:08:15.9231953Z [@azure/storage-file-share] started
     2020-05-21T23:08:17.3655931Z 
     2020-05-21T23:08:17.3657395Z TypeError: Cannot destructure property `remove` of 'undefined' or 'null'.
     2020-05-21T23:08:17.3658106Z     at Object.<anonymous> (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/nock/11.9.1/node_modules/nock/lib/interceptor.js:10:20)
     2020-05-21T23:08:17.3658698Z     at Module._compile (module.js:653:30)
     2020-05-21T23:08:17.3659079Z     at Object.Module._extensions..js (module.js:664:10)
     2020-05-21T23:08:17.3659446Z     at Module.load (module.js:566:32)
     2020-05-21T23:08:17.3659846Z     at tryModuleLoad (module.js:506:12)
     2020-05-21T23:08:17.3660576Z     at Function.Module._load (module.js:498:3)
     2020-05-21T23:08:17.3660964Z     at Module.require (module.js:597:17)
     2020-05-21T23:08:17.3661391Z     at require (internal/module.js:11:18)
     2020-05-21T23:08:17.3661823Z     at /home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/mocha/7.1.2/node_modules/mocha/lib/mocha.js:314:36
     2020-05-21T23:08:17.3662233Z     at Array.forEach (<anonymous>)
     2020-05-21T23:08:17.3662665Z     at Mocha.loadFiles (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/mocha/7.1.2/node_modules/mocha/lib/mocha.js:311:14)
  • Build failure
  • Probably inter-related to the dynamic require mentioned in the previous issue, needs more investigation to figure out how to avoid the isuse.

@HarshaNalluru HarshaNalluru changed the title Harshan/issue/9066 Update "@rollup/plugin-commonjs" to ^11.1.0 May 21, 2020
@ramya-rao-a
Copy link
Contributor

@HarshaNalluru Can we close this? The master branch reflects the version of this dependency to be ^11.1.0

@HarshaNalluru
Copy link
Member Author

HarshaNalluru commented Oct 20, 2020

That's nice, closing now.
Fix from issue -1 is still good and should be taken in.
Will revisit if needed later.

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