Repository navigation
chore: keep built bundles out of search; remove unused dependencies and config - #226
Draft
TobiasDuelli wants to merge 2 commits into
Draft
TobiasDuelli wants to merge 2 commits into
TobiasDuelli wants to merge 2 commits into
Conversation
A grep for an SDK identifier hit about 600 built bundles in published/ and build/ for every match in src/. .ignore keeps ripgrep and the tools built on it to the code; git, the build, the CDN deploy and npm do not read it. published/_headers stays searchable because it is deploy config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- unique-selector: src imports its vendored copy (src/unique-selector), never the package, so no bundle contains it. - 9 devDependencies nothing uses: @babel/cli, @babel/eslint-parser, @babel/plugin-transform-runtime, @node-minify/clean-css, @node-minify/core, @node-minify/csso, babel-preset-minify, eslint (no config, no script), uglify-js (terser minifies). - style-loader, css-loader, url-loader, file-loader and their two webpack rules: src imports no CSS, image or font file. - swa-cli.config.json: Azure Static Web Apps, replaced by the Cloudflare deploy; its workflow is long gone. Removed with npm uninstall: the lockfile only loses entries (160), with no version changes. Every built bundle is byte-identical to master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of the cleanup: keep built bundles out of search, and remove dependencies and config nothing uses. No behaviour change. Every built bundle is byte-identical to
master, and the npm tarball differs only inpackage.json, by the 14 removed dependency entries.What changes
.ignore.ignore, one sentence inAGENTS.mdpublished/(except_headers, which is deploy config),build/and four old bundles or minified vendor files indemo/. Git, the build, the CDN deploy and npm do not read.ignore. A path named explicitly is still searched.unique-selectorout ofdependenciespackage.json,package-lock.jsonsrcimports the vendored copysrc/unique-selector(GleapTourSelector.js:1), never the package.package.json,package-lock.json@babel/cli,@babel/eslint-parser,@babel/plugin-transform-runtime,@node-minify/clean-css,@node-minify/core,@node-minify/csso,babel-preset-minify,eslint(no config, no script),uglify-js(terser minifies). Found by knip, each checked by hand.package.json,package-lock.json,webpack.config.jsstyle-loader,css-loader,url-loader,file-loader:srcimports no CSS, image or font file.swa-cli.config.jsondeletedwrangler.jsonc); the Azure workflow was deleted in 2022.Untouched:
src/,index.d.ts,build/,published/,.github/workflows/.Removing dependencies and changing
webpack.config.jsare stop-and-ask items inAGENTS.md; this PR is the approved first phase.Search
From the repo root, ripgrep 14.1.1:
rg -lstartFeedbackFlowpublished/, 6 inbuild/, 2 indemo/, 5 insrc/,index.d.ts)src/andindex.d.tsinjectSessionbb-feedback-buttonProof
Bundles.
origin/master(freshgit archive,npm ci,npm run build) against this branch (npm ci,npm run build), Node 24.22.3. sha256 of all 13 outputs:build/browser/index.jsbuild/browser/index.js.mapbuild/esm/index.mjsbuild/esm/index.mjs.mapbuild/cjs/index.jsbuild/cjs/index.js.mapbuild/embed/survey-embed.jspublished/latest/andpublished/19.9.0/(index.js,.map,survey-embed.js)npm tarball.
npm packon both sides: the same 11 files, and onlypackage.jsondiffers. Its structural diff:unique-selectorfor customers.npm install gleapfetches one package fewer:unique-selector@0.5.0, which has no dependencies of its own. Nothing loads it at runtime:unique-selectorsources, all under./src/unique-selector/. The npm packages inside are only floating-ui,@rrweb/packer,@rrweb/recordandmodern-screenshot.require("…")inbuild/cjs/index.jsandbuild/browser/index.js, 0 imports inbuild/esm/index.mjs.survey-embed.jsimports nothing.srcimports the package 0 times.Worth a line in the next version's
CHANGELOG.md.Lockfile. Done with
npm uninstall: 886 → 726 entries, 160 removed, 0 added, 0 with a changed version,resolvedorintegrity, 0 flag changes. The root lists lose exactly the 14 names above. As a side effect, 10 open Dependabot alerts (6 high, 4 medium) are on packages that leave the lockfile (js-yaml,lodash,flatted,postcss-selector-parser).Checks
npm run test:smoke: 8 passed, on the branch's build.npx vitest related webpack.config.js package.json --run: 44 files, 1,047 tests passed. Withpackage.jsonin the change,relatedselects every test.npm run typecheck: passed.node tools/quality/check.mjs: 0 problems, 0 warnings.npm ls --allreports oneinvalid: esbuild@0.17.19, the same onmaster.Next
Not in this PR:
index.d.tsfixes../Gleapimport cycle.🤖 Generated with Claude Code