Skip to content

Commit

Permalink
V4 release (#1258)
Browse files Browse the repository at this point in the history
For a full list of changes see the CHANGELOG.md or the [migration guide](https://styledictionary.com/version-4/migration/) from version 3.x.x to version 4.0.0

* BREAKING: make style-dictionary ESM-only and browser-compatible (#1014)
* Update docs (#1051)
* chore: upgrade glob to latest, set posix:true, verify & fix Windows (#1070)
* chore: fix glob usage in script (#1074)
* fix: glob dependency (#1075)
* chore: release (prerelease) (#1076)
* feat: improve and test ref utils error handling (#1077)
* feat: expose flattenTokens utility (#1079)
* fix: resolved filepath, async parser await (#1083)
* feat: allow deferring transitive transforms from the transformer (#1069)
* feat: support w3c special properties (#1081)
* feat: expose typeW3CDelegate util function (#1087)
* fix: small bug with w3c type delegate util (#1088)
* fix: only run postinstall scripts in non- prod-mode (#1091)
* fix: publish missing script file to npm (#1093)
* fix: dev scripts only run in sd cwd (#1095)
* fix: escape double quotes for ts outputStringLiterals (#1097)
* W3C Syntax refactor to allow value & type token names/groups (#1100)
* feat: support async for all hooks (#1106)
* fix: dtcg option not passed in some places (#1116)
* fix: outputReferenceFallbacks for css/variables formatter (#1113)
* fix: missing type imports (#1118)
* feat: allow transforms to be added on top of transformGroup (#1120)
* chore: fix ref docs mistakes, add DTCG option (#1122)
* feat: remove reliance on CTI, add token type (#1123)
* feat: redesign logging (#1125)
* fix: outputReferences for DTCG spec tokens (#1127)
* feat: allow passing Filesystem volumes to SD instance / extend method (#1128)
* chore: update docs volumes (#1130)
* fix: absolute paths in Node env (#1134)
* feat: add warnings disabled option, fix logging issues (#1136)
* fix(types): add missing type keyword for type export from index.d.ts (#1139)
* Revamp docs (#1141)
* feat: allow outputReferences function, publish filter util for it (#1145)
* feat: move formatHelpers to utils entrypoint (breaking) (#1147)
* chore: add migration docs (#1148)
* Some small docs fixes, and removing docsify (#1149)
* fix: change merging behavior for tokens to override (#1151)
* fix: asset url handling in CSS format (#1153)
* feat: add outputReferencesTransformed utility function (#1154)
* fix: outputReferencesTransformed util handling object-value tokens, unfiltered (#1155)
* chore: fix some docs links (#1159)
* fix: logging to be in sequence per platform (#1161)
* fix: get rid of lodash, refactor templates to ES6 (#1160)
* Format options improvements (#1165)
* feat: turn off generated timestamp by default in file headers (#1174)
* Expand composites (#1169)
* Align Hooks APIs (#1185)
* feat: move fileHeader global prop to hooks.fileHeaders (#1177)
* feat: move filter global prop to hooks.filters, rename matcher to filter (#1179)
* feat: move action global prop to hooks.actions (#1180)
* feat: move parsers global prop to hooks.parsers, apply explicitly (#1181)
* feat: move transformGroup global prop to hooks.transformGroups (#1182)
* feat: move transforms global prop to hooks.transforms, align api (#1183)
* feat: move formats global prop to hooks.formats, align api (#1184)
* fix: color filter now skips invalid colors (#995) (#1188)
* chore: docs mentions extend twice, duplicate (#1192)
* feat: add object-value CSS shorthand transforms (#1194)
* feat: pass options to fileheaders and filters, add unfilteredAllTokens (#1205)
* fix: pass options to transforms filters, live demo main page (#1208)
* chore: allow preselecting playground file (#1209)
* fix: typeDtcgDelegate  at any position, size/rem apply to unitless values (#1210)
* feat: add convert to DTCG spec utilities, file converter docs site (#1200)
* chore: version inject for sd-playground on build (#1216)
* docs(DTCG): Update DTCG docs with latest link and fix full name (#1215)
* chore: add mermaid integration to docs, create architecture (#1221)
* feat: add formatPlatform/formatAllPlatforms methods (#1222)
* fix: allow register hooks override existing (#1223)
* feat: pass dictionary options to preprocessors (#1224)
* feat: pass ref path in getReferences util output (#1226)
* chore: add missing changeset for SD format platform methods (#1227)
* timingFunction and fontFamily props, optional border props (#1229)
* fix: expand on platform level to adjust path prop (#1231)
* fix: fix CLI, update basic example, fix android templates DTCG (#1235)
* feat: allow not throwing on broken refs (#1240)
* feat: recursively expand nested composite tokens (#1244)


---------

Co-authored-by: Andreas Nordahl <[email protected]>
Co-authored-by: tkgroot <[email protected]>
Co-authored-by: Lukas Oppermann <[email protected]>
Co-authored-by: Lukas Oppermann <[email protected]>
Co-authored-by: Joren Broekema <[email protected]>
Co-authored-by: Tom Pietrosanti <[email protected]>
Co-authored-by: Kaelig Deloumeau-Prigent <[email protected]>
Co-authored-by: Daan Vos de Wael <[email protected]>
Co-authored-by: Abel van Beek <[email protected]>
  • Loading branch information
10 people authored Jun 28, 2024
1 parent 17f4cb2 commit f6c423f
Show file tree
Hide file tree
Showing 679 changed files with 60,214 additions and 51,697 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
35 changes: 19 additions & 16 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
{
"ignorePatterns": ["/docs/dist/**/*"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"allowImportExportEverywhere": true
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["jest"],
"env": {
"node": true,
"mocha": true,
"jest": true
"es6": true,
"browser": true
},
"globals": {
"Buffer": true,
"escape": true
},
"extends": ["eslint:recommended", "plugin:jest/recommended"],
"extends": ["eslint:recommended"],
"plugins": ["mocha"],
"rules": {
"no-console": 0,
"no-unused-vars": 1,
"no-control-regex": 0,
"comma-dangle": 0,
"no-prototype-builtins": 0,
"jest/valid-title": 0
}
"no-console": ["error", { "allow": ["warn", "error"] }],
"mocha/no-exclusive-tests": "error",
"no-var": "error"
},
"overrides": [
{
"files": ["examples/**/*.js"],
"rules": {
"no-console": 0
}
}
]
}
5 changes: 2 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
*Issue #, if available:*

*Description of changes:*
_Issue #, if available:_

_Description of changes:_

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
# use lts, bump this if new major becomes lts
node-version: 20.x
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: npm ci

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run release
commit: 'chore: release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
23 changes: 0 additions & 23 deletions .github/workflows/test.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Verify changes

on: pull_request

jobs:
verify:
name: Verify changes
strategy:
matrix:
# latest node & minimum node according to pkg.json engines
node-version: [18.0, 21.x]
os: [ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Linting & Formatting
run: npm run lint

- name: Node tests
run: npm run test:node

- name: Install chromium
run: npx playwright install --with-deps chromium

- name: Browser tests
run: npm run test
29 changes: 16 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Logs
logs
/logs
*.log
npm-debug.log*

Expand All @@ -8,11 +8,8 @@ pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
/coverage

# nyc test coverage
.nyc_output
Expand All @@ -24,7 +21,7 @@ coverage
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
/build/Release

# Dependency directories
node_modules
Expand All @@ -40,24 +37,24 @@ yarn.lock
.node_repl_history

# Native Builds
build/
/build/

# Android Specific Files
.gradle/
local.properties
gen/
out/
/gen/
/out/
*.class
.navigation/
captures/
/captures/
*.apk
*.ap_
*.iml
.idea/
*.jks

# IOS Specific Files
DerivedData/
/DerivedData/
*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -77,5 +74,11 @@ xcuserdata/
# Mac directory hidden files
*.DS_Store

# Temporary build output directory for unit tests
__tests__/__output
# Temporary build output directory for tests
/__tests__/__output
/__integration__/build

# build output
/docs/dist/
# generated types
.astro/
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
npx lint-staged
2 changes: 1 addition & 1 deletion .jsdoc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"plugins": ["./node_modules/jsdoc-escape-at"]
"plugins": ["./node_modules/jsdoc-escape-at", "./node_modules/jsdoc-tsimport-plugin/index.js"]
}
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.eslintrc.json
.editorconfig
images/
test/
__tests__/
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.changeset/
**/*.snap.js
/docs/dist
Loading

0 comments on commit f6c423f

Please sign in to comment.