Do not hash builds
The new builds look like this:
├── config.cjs
├── config.cjs.map
├── config.d.cts
├── config.d.mts
├── config.d.ts
├── config.mjs
├── config.mjs.map
├── index.cjs
├── index.cjs.map
├── index.d.cts
├── index.d.mts
├── index.d.ts
├── index.mjs
├── index.mjs.map
├── shared
│ ├── eslint-plugin.CaL0MuK2.cjs
│ ├── eslint-plugin.CaL0MuK2.cjs.map
│ ├── eslint-plugin.D2rg1yPi.cjs
│ ├── eslint-plugin.D2rg1yPi.cjs.map
│ ├── eslint-plugin.D4kZ4YwI.d.cts
│ ├── eslint-plugin.D4kZ4YwI.d.mts
│ ├── eslint-plugin.D4kZ4YwI.d.ts
│ ├── eslint-plugin.DBGY0Wh2.mjs
│ ├── eslint-plugin.DBGY0Wh2.mjs.map
│ ├── eslint-plugin.fjjcXqAk.mjs
│ └── eslint-plugin.fjjcXqAk.mjs.map
└── workers
├── check-sql.worker.cjs
├── check-sql.worker.cjs.map
├── check-sql.worker.d.cts
├── check-sql.worker.d.mts
├── check-sql.worker.d.ts
├── check-sql.worker.mjs
└── check-sql.worker.mjs.map
This means that pnpm-patch can no longer re-apply patches between versions as the file name (hash) changes between every release.
Actually, now that I compare v3.6 and v4, it looks like earlier versions also used hash, but the meat and potatoes of the plugin were in the /index.mjs so it wasn't a problem. But now that the contents of the plugin moved to /shared/eslint-plugin.DBGY0Wh2.mjs it becomes a problem.
Either way, not hashing any of the build file names is what's desired.
Interesting. I'm using unbuildjs which uses rollup under the hood. Since I export both . and /config which both of them are using the same shared code, the bundler creates a shared file with a hash. I tried to remove the hash (which is by default) by adjusting rollup.output, but it doesn't play nicely with rollup.emitCJS.
I'm not sure why I separated /config in the first place. I guess I could merge them which as a result will remove the shared directory with the has files, but it would be a breaking change:
- import safeql from "@ts-safeql/eslint-plugin/config";
+ import safeql from "@ts-safeql/eslint-plugin";
I'm wondering how bad would it be to introduce it as a minor rather than another major.