Skip to content

Conversation

@aperkaz
Copy link

@aperkaz aperkaz commented Jan 6, 2026

This PR is a proposal for adding glob and ignore capabilities to the ttag-cli while keeping backwards compatibility (#78).

Feedback is welcome! 🙂

The feature has been built around the following goals:

  • Keep backwards compatibility and don't introduce breaking changes.
  • src globs and ignored paths are additional features.

Change summary:

  • Minimum package updates (glob package requires a higher version of typescript, thus creating a chain reaction that required updating jest too).
  • Most of snapshot updates are due to the jest version bump.
  • Extension of src/index.ts to inject the ignore argument into the commands/*.
  • All the file path calculation is encapsulated within src/libs/utils.ts > resolvePaths. No changes were made to the existing file-walking logic.

@aperkaz aperkaz changed the title Feat/support globs and ignore Support globs for src and ignoring paths Jan 6, 2026
@aperkaz aperkaz changed the title Support globs for src and ignoring paths Support globs for src and ignoring paths #78 Jan 6, 2026
@aperkaz aperkaz changed the title Support globs for src and ignoring paths #78 Support globs for src and ignoring paths Jan 6, 2026
@aperkaz aperkaz mentioned this pull request Jan 6, 2026
Comment on lines +53 to +58
"jest": "^30.2.0",
"lint-staged": "^5.0.0",
"prettier": "^1.19.1",
"ts-jest": "^26.3.0",
"ts-jest": "^29.4.6",
"ts-node": "3.3.0",
"typescript": "^3.9.7"
"typescript": "^4.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These may be good changes, but they are strictly unrelated.

Copy link
Author

@aperkaz aperkaz Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the description, the glob package required a higher version of typescript, thus creating a chain reaction that required updating jest too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh... I would personally prefer dependency bumps to be a separate PR, but then again I'm not the owner of this project, maybe they think it's OK.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the value of splitting it into multiple PRs but would appreciate the input of someone with merge and publish privileges.

If you have the rights @dimaqq, I will get right into it 🙂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG the diff size!

Comment on lines +27 to +30
"msgid ""
msgstr ""
"Content-Type: text/plain; charset=utf-8\\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these being changed?
(here, across this file and many other files).

It feels like the change is semantic, the (escaped) backslashes are removed.

Copy link
Author

@aperkaz aperkaz Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, Jest has changed how snapshots are formatted from v24 to v30.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's Jest 29, where escapeString: false is the new default (?)
I would propose that the jest bump is a separate PR, without prod code changes.
Yes, that's a bit of extra work, but hopefully it's mechanical work and easy to review.

aperkaz and others added 2 commits January 16, 2026 13:11
Co-authored-by: Dima Tisnek <[email protected]>
Co-authored-by: Dima Tisnek <[email protected]>
@aperkaz aperkaz requested a review from dimaqq January 16, 2026 12:14
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