-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add pipelines v1 #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
||
| if (characterName.endsWith(", First>")) { | ||
| rangeStart = codePoint; | ||
| rangeName = characterName.replace(", First>", "").replace("<", ""); |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 16 days ago
In general, to avoid incomplete escaping or cleaning when using String.prototype.replace, use a global regular expression (/.../g) or another method that processes all occurrences (e.g., split/join) instead of passing a plain string, which only affects the first occurrence.
Here, the goal is to normalize rangeName by stripping the trailing ", First>" marker and removing all < characters from the remaining name. The current code:
if (characterName.endsWith(", First>")) {
rangeStart = codePoint;
rangeName = characterName.replace(", First>", "").replace("<", "");
continue;
}only removes the first <. The most direct, non-functional-change fix is to change the second .replace to use a global regular expression:
rangeName = characterName.replace(", First>", "").replace(/</g, "");This preserves the existing behavior for typical inputs (with a single <), but correctly handles any unexpected extra < characters. No new imports or helpers are needed, and the change is localized to line 48 in packages/pipelines/pipeline-presets/src/parsers/unicode-data.ts.
-
Copy modified line R48
| @@ -45,7 +45,7 @@ | ||
|
|
||
| if (characterName.endsWith(", First>")) { | ||
| rangeStart = codePoint; | ||
| rangeName = characterName.replace(", First>", "").replace("<", ""); | ||
| rangeName = characterName.replace(", First>", "").replace(/</g, ""); | ||
| continue; | ||
| } | ||
|
|
🌏 Preview Deployments
Built from commit: 🤖 This comment will be updated automatically when you push new commits to this PR. |
9bc07f8 to
1f887f7
Compare
1f887f7 to
908f584
Compare
- Created `README.md` for documentation. - Added `package.json` with dependencies and scripts. - Configured TypeScript with `tsconfig.json` and `tsconfig.build.json`. - Set up `tsdown` for building the package. - Updated `pnpm-lock.yaml` to include new package dependencies. - Modified `pnpm-workspace.yaml` to include all packages under `packages/**`.
- Introduced `standard.ts` for parsing standard Unicode data. - Added `unicode-data.ts` for parsing detailed Unicode character metadata. - Created pipelines for basic, emoji, and full Unicode data processing. - Implemented resolvers for grouped and property JSON outputs. - Added various transforms including deduplication, range expansion, and filtering. - Established HTTP and memory sources for data retrieval. - Configured TypeScript settings for building and testing.
Modified the `build` and `dev` script filters in `package.json` to use double asterisks (`**`) for better matching of package directories.
Updated `@luxass/eslint-config` from version `7.0.0-beta.1` to `7.0.0-beta.2` for improved linting rules. Added `tinyglobby` package at version `0.2.15` to enhance globbing capabilities in the project.
- Updated `definePipeline` to use `Omit` for better type safety. - Adjusted type inference tests to validate expected types. - Added `definePipelineRoute` to the playground example for improved routing functionality.
908f584 to
e3a429c
Compare
- Introduced `vitest-testdirs` in `package.json` for improved testing capabilities. - Added comprehensive tests for pipeline file handling in `loader.test.ts`.
Refactor `findPipelineFiles` to accept an options object for improved flexibility. Update related function calls throughout the codebase to use the new structure.
🔗 Linked issue
📚 Description