Skip to content

Commit

Permalink
chore: updated deps, added tests, updated changeset changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
GarthDB committed Apr 16, 2024
1 parent b8e8dee commit 145e92e
Show file tree
Hide file tree
Showing 21 changed files with 1,610 additions and 50 deletions.
5 changes: 4 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "@changesets/cli/changelog",
"changelog": [
"@changesets/changelog-github",
{ "repo": "adobe/spectrum-tokens" }
],
"commit": false,
"fixed": [],
"linked": [],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: moonrepo/setup-toolchain@v0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: moonrepo/setup-toolchain@v0
Expand All @@ -37,11 +37,11 @@ jobs:
- run: moon run site:export
- run: moon run visualizer:build
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: "./site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: moonrepo/setup-toolchain@v0
Expand Down
4 changes: 2 additions & 2 deletions .moon/toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rust: {}
node:
# The version to use. Must be a semantic version that includes major, minor, and patch.
# We suggest using the latest active LTS version: https://nodejs.org/en/about/releases
version: "20.11"
version: "20.12"

# The package manager to use when managing dependencies.
# Accepts "npm" (default), "pnpm", or "yarn".
Expand All @@ -33,7 +33,7 @@ node:

# Infer and automatically create moon tasks from `package.json` scripts, per project.
# BEWARE: Tasks and scripts are not 1:1 in functionality, so please refer to the documentation.
inferTasksFromScripts: true
inferTasksFromScripts: false

# Sync a project's `dependsOn` as dependencies within the project's `package.json`.
syncProjectWorkspaceDependencies: true
Expand Down
2 changes: 2 additions & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ projects:
tokens: "packages/tokens"
visualizer: "docs/visualizer"
site: "docs/site"
root: "."
csvGenerator: tools/token-csv-generator
vcs:
manager: "git"
defaultBranch: "main"
1 change: 1 addition & 0 deletions docs/site/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
$schema: "https://moonrepo.dev/schemas/project.json"
stack: "frontend"
tags:
- docs
- site
Expand Down
2 changes: 2 additions & 0 deletions docs/visualizer/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
$schema: "https://moonrepo.dev/schemas/project.json"
stack: frontend
type: application
tags:
- docs
- site
Expand Down
36 changes: 36 additions & 0 deletions moon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2024 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
$schema: "https://moonrepo.dev/schemas/project.json"
stack: "infrastructure"
tasks:
test:
command:
- pnpm
- ava
- test
platform: node
pre-commit:
command:
- pnpm
- lint-staged
platform: node
local: true
prepare:
command:
- pnpm
- "husky || true"
platform: node
local: true
release:
command:
- pnpm
- changeset publish
platform: node
local: true
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@
},
"homepage": "https://github.com/adobe/spectrum-tokens#readme",
"devDependencies": {
"@action-validator/core": "^0.6.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^19.2.2",
"@commitlint/config-conventional": "^19.2.2",
"@moonrepo/cli": "^1.23.4",
"ava": "^6.1.2",
"glob": "^10.3.12",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5"
},
"engines": {
"node": "~20.11"
"node": "~20.12"
},
"packageManager": "pnpm@9.0.1"
}
6 changes: 3 additions & 3 deletions packages/tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"homepage": "https://github.com/adobe/spectrum-tokens/tree/main/packages/tokens#readme",
"devDependencies": {
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"ajv-formats": "^3.0.1",
"deep-object-diff": "^1.1.9",
"find-duplicated-property-keys": "^1.2.9",
"glob": "^10.3.10",
"glob": "^10.3.12",
"style-dictionary": "^3.9.2",
"style-dictionary-sets": "^2.3.0",
"tar": "^6.2.0",
"tar": "^7.0.1",
"tmp-promise": "^3.0.3"
}
}
4 changes: 2 additions & 2 deletions packages/tokens/tasks/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { fileURLToPath } from "url";
import { detailedDiff, diff } from "deep-object-diff";
import { exec } from "node:child_process";
import { promisify } from "util";
import tar from "tar";
import { x } from "tar";
import tmp from "tmp-promise";

const execP = promisify(exec);
Expand Down Expand Up @@ -65,7 +65,7 @@ async function getOldTokens() {
const { stdout, stderr } = await execP(
`npm pack @adobe/spectrum-tokens@${tag} --pack-destination ${tmpDir.path}`,
);
await tar.x({
await x({
cwd: tmpDir.path,
file: join(tmpDir.path, stdout.trim()),
});
Expand Down
Loading

0 comments on commit 145e92e

Please sign in to comment.