Closed ljharb closed 7 months ago
Latest commit: ab6cd95931b4b3abd1356bcf2adc2d108d4bd417
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
ah, hmm, i suppose that's true - i was assuming it runs in-situ, but i guess the pack option takes care of that?
I'll refactor to just look at the files, and that should remove the need for path
as well as the added deps.
thanks, that's much simpler. the snapshot still isn't matching the actual behavior of the built cli, tho.
I checked this out locally, ran tests, and got a new snapshot:
❯ git diff --staged
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
added: packages/cli/test/snapshots/eslint-module-utils@2.8.1.tgz --entrypoints-legacy --ignore-rules=cjs-only-exports-default.md
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@ packages/cli/test/snapshots/eslint-module-utils@2.8.1.tgz --entrypoints-legacy --ignore-rules=cjs-only-exports-default.md:4 @
# eslint-module-utils@2.8.1.tgz --entrypoints-legacy --ignore-rules=cjs-only-exports-default
$ attw eslint-module-utils@2.8.1.tgz --entrypoints-legacy --ignore-rules=cjs-only-exports-default
eslint-module-utils v2.8.1
Build tools:
typescript@next
(ignoring rules: 'cjs-only-exports-default')
No problems found 🌟
┌─────────────────────────────────────────┬────────┬───────────────────┬───────────────────┬─────────┐ │ │ node10 │ node16 (from CJS) │ node16 (from ESM) │ bundler │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/declaredScope.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/hash.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/ignore.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/module-require.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/ModuleCache.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/moduleVisitor.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/parse.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/pkgDir.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/pkgUp.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/readPkgUp.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/resolve.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/unambiguous.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ ├─────────────────────────────────────────┼────────┼───────────────────┼───────────────────┼─────────┤ │ "eslint-module-utils/visit.js" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ └─────────────────────────────────────────┴────────┴───────────────────┴───────────────────┴─────────┘
Exit code: 0
\ No newline at end of file
I think this looks right? What are you getting?
That's totally right! what i get is what's in this PR :-/
I was able to effectively start from scratch and get the md to update, but the json snapshot data still doesn't look right.
the json snapshot data still doesn't look right
The JSON snapshot is running the core library with default options; only the CLI test is getting the entrypointsLegacy
option.
Updated except for https://github.com/arethetypeswrong/arethetypeswrong.github.io/pull/156#discussion_r1504670172
I'm happy to expand the functionality, in this PR, so that --exclude-entrypoints
can be used in concert with --entrypoints-legacy
- but it should probably be an error to use --entrypoints
or --include-entrypoints
with it, since there's nothing that can possibly be included that's not already in the file list?
Thanks @ljharb!
Note that the snapshots here are incorrect - despite these changes working as expected on the actual project/version in question, it's not working when i run the tests locally.
Closes #153.