fix(table): read column fields that @sdcorejs/utils 1.2 rejects as paths; pin @sdcorejs/utils 1.2.5 - #72
Merged
Conversation
…ths; pin @sdcorejs/utils 1.2.5
Since @sdcorejs/utils 1.2, Utilities.getNestedValue throws UnsafePropertyPathError
for a property path with whitespace or "*". SdTable read row values with it, and
TableFormatService.format did so outside the per-cell try, so a table whose
columns come from backend keys ("Số phòng ngủ", "Loại sản phẩm*") failed the
whole read with "Không thể tải dữ liệu". The published 2.15 lines still pin
utils 1.1.4, so the regression exists only on main.
Add the internal resolveFieldValue (components/table/src/services/
field-value.util.ts), the same resolver as @sd-angular/core NSP-5745. A path
that utils accepts keeps the getNestedValue result. A rejected path falls back
to the 1.1.x dot-split lookup over own data properties, never through
__proto__/prototype/constructor and never into a prototype object. Rejection is
detected once per field with a probe instead of instanceof. Every column and
group field read uses it: format and lazy-values, desktop cell, SdGroupPipe,
aggregates, quick search, export, local filter and sort. rowKey, valueField and
displayField reads are unchanged.
Pin @sdcorejs/utils 1.2.5 on v19-v22 and the showcase. 1.2.5 keeps error
instanceof and name stable across bundled entry points, so a cancelled file
picker is recognised again in sd-upload-file, SdApiService.upload() and
SdExcelService.upload() in application builds. Lockfiles change only the
@sdcorejs/utils entry. sd-table.md and the [Unreleased] utils bullet describe
the rule; v20-v22 are rolled out with npm run sync.
Verification: v19 table + upload-file/api/excel specs 892/892; npm run build
(v19); npm run check:sync; eslint on the 16 changed v19 files; npm ls
@sdcorejs/utils = 1.2.5 in v19-v22 and showcase; delivery convergence
CONVERGED (all 9 acceptance criteria automated).
Refs NSP-5745
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sdcorejs skill pack writes intermediate run output under .sdcorejs/tmp; it is never a change artifact. Verification: git check-ignore matches .sdcorejs/tmp/* and does not match .sdcorejs/docs/**. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdcorejs
marked this pull request as ready for review
October 2, 2026 00:12
sdcorejs
pushed a commit
that referenced
this pull request
Oct 2, 2026
Brings in #72 (table field reads, @sdcorejs/utils 1.2.5). The only conflicts were the "Updated At" timestamps in versions/v*/SYNC-STATUS.md; kept this branch's side. npm run sync on the merged tree produced no content change, and npm run check:sync passes. Verification: npm ci (v19); Karma icon, section, inform, data-state, notify, confirm, image-editor and table specs 1128/1128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On
main,SdTablefails the whole read with "Không thể tải dữ liệu" when a column or groupfieldcontains whitespace or*. Tables whose columns come from backend keys, such as import results with'Số phòng ngủ'or'Loại sản phẩm*', hit this.The cause is
@sdcorejs/utils1.2. ItsUtilities.getNestedValuethrowsUnsafePropertyPathErrorfor those property paths.TableFormatService.formatread the value outside the per-celltry.The published 2.15 lines still pin utils 1.1.4, so this regression exists only on
main.This PR ports the
@sd-angular/corefix (NSP-5745). It also pins@sdcorejs/utils1.2.5 (sdcorejs-utils #15), which keeps cross-entryinstanceofworking in bundled apps.Changes
components/table/src/services/field-value.util.ts(new, internal):resolveFieldValue.getNestedValueresult.__proto__,prototypeorconstructor, and never returns a prototype object.instanceof.try);SdGroupPipe;rowKey,valueFieldanddisplayFieldreads are unchanged.@sdcorejs/utils1.2.4→1.2.5in the v19–v22 workspaces and libraries and in the showcase.sd-upload-file,SdApiService.upload()andSdExcelService.upload()in application builds.sd-table.md: thefieldrow now describes the fallback.CHANGELOG.md[Unreleased]→### Changed: the existing utils bullet now reads1.1.4→1.2.5. It also notes the table field rule, the file-picker cancel fix and theerrorNamerequirement for subclasses. No### Fixedentry, because these regressions never shipped.npm run sync..sdcorejs: approved spec and plan (revision 2) and the execution record..gitignoreignores.sdcorejs/tmp.Verification
All runs used Node 22.22.3.
TS2307, and the existing table specs had 8 new failures (UnsafePropertyPathError).npm run build(v19):Built Angular Package.npm run check:sync: v20, v21 and v22 match v19.npm ls @sdcorejs/utilsresolves 1.2.5 in v19, v20, v21, v22 and the showcase.CONVERGED, with all 9 acceptance criteria automated. Branch-ready had no blockers.Not run:
test:ci(the table suite and the utils consumer specs were run instead).check:sync).Review and repair
R1 (required) was fixed. The CHANGELOG first added
### Fixedentries for regressions that never shipped. The text now lives in the existing[Unreleased]utils bullet.Two advisories are left for follow-up:
filters[].fieldstill goes throughFilterUtilities.match, so the strict path rule applies there. These fields are developer-defined.npm run syncon acore.autocrlf=truecheckout writes CRLF into v22, whose.gitattributessayseol=lf.npm installin v20 and v21 also re-indents the lockfile. Both were corrected by hand here.Notes for reviewer
@sdcorejs/utilserror must declarestatic override readonly errorName: string. The library itself has no such subclass.fix(table)commit.🤖 Generated with Claude Code