[[MIRROR from GitHub]] Property based testing framework for JavaScript (like QuickCheck) written in TypeScript fast-check.dev

✨(packaged) Replace keepNodeModules with flexible keep patterns (#6713) master

## Description Replaces the `keepNodeModules` boolean option with a more flexible `keep` array option that accepts glob patterns. This allows users to preserve any files or directories matching specified patterns, not just `node_modules`. ### Changes - **API**: Changed `removeNonPublishedFiles()` option from `keepNodeModules: boolean` to `keep: string[]` (glob patterns) - **CLI**: Updated `--keep-node-modules` flag to `--keep <glob>` (can be specified multiple times) - **Implementation**: Updated pattern matching logic to use glob-based filtering instead of a hardcoded path check - **Tests**: Refactored test cases to cover glob pattern matching with multiple scenarios (node_modules, tsconfig files, multiple patterns) - **Documentation**: Updated README and type definitions to reflect the new API ### Motivation The new approach is more flexible and allows users to preserve any files or directories matching glob patterns (e.g., `tsconfig*`, `src`, etc.) rather than being limited to just `node_modules`. ## Checklist - [x] I have a full understanding of every line in this PR - [ ] I flagged the impact of my change (minor / patch / major) either by running `pnpm run bump` or by following the instructions from the changeset bot - [x] I kept this PR focused on a single concern and did not bundle unrelated changes - [x] I followed the [gitmoji](https://gitmoji.dev/) specification for the name of the PR - [x] I added relevant tests and they would have failed without my PR https://claude.ai/code/session_01Sf6CnWKuP1jHUcFiLJ97u3 --------- Co-authored-by: Claude <noreply@anthropic.com>


+75 -42
7 changed files