Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37714

js-builder bundle transform not taking dedupe into account when translating fullPaths to Ids

    • 1.0-beta-1

      js-builder does some transforms on the browserify bundles as part of it's "thing". At the very end, it translates the bundle pack entry IDs from being long "fullPath" IDs to short numbers. Something we missed in this was how browserify dedupes bundle pack entries that are identical, with the deduped pack entry containing the pack ID ... we need to find these too and translate the pack IDs here too.

          [JENKINS-37714] js-builder bundle transform not taking dedupe into account when translating fullPaths to Ids

          Tom FENNELLY added a comment -

          BTW ... these duplicates seem to be happening because of deps being dragged in by jsonwebtoken, where these deps are also deps of other packages, but having different versions. The diff versions results in npm hanging them on subbranches down inside node_modules, which means they end up having different paths and fullPath IDs, but often having identical module file content => resulting in the dedupe.

          Tom FENNELLY added a comment - BTW ... these duplicates seem to be happening because of deps being dragged in by jsonwebtoken, where these deps are also deps of other packages, but having different versions. The diff versions results in npm hanging them on subbranches down inside node_modules, which means they end up having different paths and fullPath IDs, but often having identical module file content => resulting in the dedupe.

          Tom FENNELLY added a comment -

          Tom FENNELLY added a comment - Have a Wip PR: https://github.com/jenkinsci/js-builder/pull/8

          Tom FENNELLY added a comment -

          And the BlueO PR pulling in the js-builder fixes ... https://github.com/jenkinsci/blueocean-plugin/pull/444

          Tom FENNELLY added a comment - And the BlueO PR pulling in the js-builder fixes ... https://github.com/jenkinsci/blueocean-plugin/pull/444

          Code changed in jenkins
          User: Tom Fennelly
          Path:
          internal/bundlegen.js
          internal/pipeline-transforms/require-stub-transform.js
          package.json
          spec/modules/dedupe-main.js
          spec/modules/dedupe-one.js
          spec/modules/dedupe-two.js
          spec/require-stub-transform-spec.js
          http://jenkins-ci.org/commit/blueocean-js-builder/b2e6eedcc7e775aa879ec5ef5f1a477715e3ac5e
          Log:
          JENKINS-37714 Take dedupe into account when translating fullPaths to Ids (#8)

          • [FIX JENKINS-37714] Take dedupe into account when translating fullPaths to Ids
          • 0.0.38-beta2
          • Search for the list of modules to be imported using a rouch string search

          Vs using a require transform and explicitly searching the require statements, which can fail ala https://github.com/benbria/browserify-transform-tools/issues/23

          • 0.0.38-beta3
          • 0.0.38

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Fennelly Path: internal/bundlegen.js internal/pipeline-transforms/require-stub-transform.js package.json spec/modules/dedupe-main.js spec/modules/dedupe-one.js spec/modules/dedupe-two.js spec/require-stub-transform-spec.js http://jenkins-ci.org/commit/blueocean-js-builder/b2e6eedcc7e775aa879ec5ef5f1a477715e3ac5e Log: JENKINS-37714 Take dedupe into account when translating fullPaths to Ids (#8) [FIX JENKINS-37714] Take dedupe into account when translating fullPaths to Ids 0.0.38-beta2 Search for the list of modules to be imported using a rouch string search Vs using a require transform and explicitly searching the require statements, which can fail ala https://github.com/benbria/browserify-transform-tools/issues/23 0.0.38-beta3 0.0.38

            tfennelly Tom FENNELLY
            tfennelly Tom FENNELLY
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: