amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.93k stars 557 forks source link

fix: check buildPath consistently #1143

Closed jcfranco closed 4 months ago

jcfranco commented 7 months ago

Issue #, if available: #1144

Description of changes:

Extracted buildPath-checking logic to its own util and ensure it uses the platform-specific separator.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jorenbroekema commented 7 months ago

Not sure if I can get this into v3, @dbanksdesign this fix and this one are waiting for your approval, might be nice to do another v3 release since v4 is still in prerelease/alpha stage.

I'll make sure to port this fix to v4, it's slightly more nuanced of a fix there since it has to be browser-compatible as well, and in browsers a filesystem shim is used that uses posix separators regardless of whether the user agent is Windows. For v3 this fix is fine though!

jcfranco commented 7 months ago

@jorenbroekema Thanks for the review!

@dbanksdesign LMK if there's anything else needed from my side to help get this landed for a v3 release. Thanks!

jorenbroekema commented 4 months ago

v4 is stable and merged to main by now, so closing this as fixed in v4