Decouple placeholder-plain from pdfkit010 by moving shared utilities to utils package#294
Conversation
…ed utilities to utils package Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
|
@copilot ensure we are consistent with named exports. I see PDFAbstractReference is a default export for example. |
Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
You're absolutely right! I've made PDFAbstractReference consistent with the other exports by changing it from Changed in commit 9f5f44d. |
|
@copilot you seem to have remove the dist. |
Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
You're absolutely right - I accidentally removed dist files during the refactoring. I've now run Fixed in commit 470b716. |
|
@copilot you probably need the built dist before linting. The error shows that signer-p12 cannot resolve utils. I would assume it uses the dist of utils and if that was not available at the time it would fail. |
You're absolutely correct! The import resolution errors were happening because lint was running before the utils package dist was built. I ran |
|
@copilot see what @coveralls has reported. We are no longer covering these utils with tests. Were they ignored so far or were they just covered because they were used in other code? |
… coverage Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
You're absolutely right! The coverage issue occurred because PDFObject.js and PDFAbstractReference.js were previously covered indirectly through the pdfkit010 package tests that imported and used them. When I moved them to the utils package, they lost that indirect coverage. I've added comprehensive unit tests for both files:
The utilities were being tested before, but only as a side effect of being used by other packages. Now they have proper unit tests in their new location. Fixed in commit e66d556. |
|
@copilot there are some linting errors that need addressing after these changes. And I doubt 80+ % will do. We need 100% coverage in the repo. Should be easy to do as we're dealing with utilities. |
Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
Fixed all linting errors and achieved 100% test coverage across all files in the utils package. The issues addressed include: Linting fixes:
Coverage improvements:
All packages now pass linting and testing successfully. Fixed in commit fbd67c4. |
…om index.js Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
Coverage Details:
Linting:
The utilities are now properly organized in the utils package with comprehensive test coverage and strict code quality standards. Removed unnecessary test-only utility functions as per feedback.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.