Skip to content

πŸ—οΈπŸ”§οΌšdrop gulp-sourcemaps for gulp's own sourcemap support - #1791

Merged
OpenINFbot merged 1 commit into
livefrom
fix/drop-gulp-sourcemaps
Aug 10, 2026
Merged

πŸ—οΈπŸ”§οΌšdrop gulp-sourcemaps for gulp's own sourcemap support#1791
OpenINFbot merged 1 commit into
livefrom
fix/drop-gulp-sourcemaps

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

gulp-sourcemaps has had no release since November 2020, and it is the only thing still pulling postcss 7 into the tree:

$ pnpm why postcss
postcss@7.0.39
└─┬ @gulp-sourcemaps/identity-map@2.0.1
  └─┬ gulp-sourcemaps@3.0.0
    └── @openinf/portal (devDependencies)

postcss 7 is end-of-life, so the five advisories filed against it β€” four of them high β€” cannot be resolved by upgrading. Our own postcss is 8.5.26 and was never affected; the alerts persist purely because this one abandoned package drags v7 along behind it.

gulp has accepted sourcemaps options on src and dest since v4, which is all this task was using gulp-sourcemaps for.

It also fixes the sourcemap, which has never worked

sourcemaps.write() ran before gulp-rename, so the rename rewrote the map's extension along with the stylesheet's:

on disk stylesheet asks for
before maps/main.css.min.css maps/main.css.map ❌
after maps/main.min.css.map maps/main.min.css.map βœ…

The file was a perfectly valid source map the whole time β€” just written under a name nothing referenced, so devtools got a 404. Writing it through dest after the rename lines the two up.

$ python3 -c "import json; m=json.load(open('_site/assets/styles/maps/main.min.css.map')); print(m['version'], len(m['sources']), m['file'])"
3 43 main.min.css

Verification

Emitted CSS is unchanged. Built both revisions and diffed, ignoring the sourceMappingURL comment:

dev  main.css      IDENTICAL
prod main.min.css  IDENTICAL   (133125 β†’ 133128 bytes; the map filename is 3 chars longer)

nps build, nps test, and nps format.all all pass, with format.all leaving the tree clean.

After the change the lockfile contains no reference to postcss@7 or gulp-sourcemaps, and the build still succeeds with the orphaned store directories deleted β€” so nothing was quietly depending on them.

What this does not fix

The remaining two alerts are immutable@3.8.3, reached through browser-sync. Browser-sync is current (2025-04), so that one needs either an upstream fix or a different dev server; it is dev-only and out of scope here.

Part of working through #254 β€” though most of that list is release-inactivity noise rather than risk. This was the entry where an abandoned package and an unfixable advisory were the same problem.

List of any relevant issue numbers: #254

gulp-sourcemaps has had no release since November 2020, and it is the
only thing still pulling postcss 7 into the tree:

  postcss@7.0.39
  └─┬ @gulp-sourcemaps/identity-map@2.0.1
    └─┬ gulp-sourcemaps@3.0.0
      └── @openinf/portal (devDependencies)

postcss 7 is end-of-life, so the five advisories filed against it β€”
four of them high β€” cannot be resolved by upgrading. Our own postcss
is 8.5.26 and was never affected. gulp has accepted `sourcemaps`
options on src and dest since v4, which is all this task was using
gulp-sourcemaps for.

Writing the map through dest also fixes it. `sourcemaps.write()` ran
before the rename, so gulp-rename rewrote the map's extension along
with the stylesheet's and left `maps/main.css.min.css` on disk while
the stylesheet asked for `maps/main.css.map`. The map has been dead
for as long as it has existed. It is now written after the rename, as
`maps/main.min.css.map`, which is what the stylesheet points at.

Emitted CSS is unchanged: both `main.css` and `main.min.css` are
byte-identical to before apart from the sourceMappingURL comment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

βœ… Deploy Preview for gh-pages-openinf ready!

Name Link
πŸ”¨ Latest commit 1c4833b
πŸ” Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a795f350ec3020008d0cf7e
😎 Deploy Preview https://deploy-preview-1791--gh-pages-openinf.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@OpenINFbot
OpenINFbot merged commit 1ac395d into live Aug 10, 2026
13 checks passed
@OpenINFbot
OpenINFbot deleted the fix/drop-gulp-sourcemaps branch August 10, 2026 05:27
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