Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a153c93
chore: migrating from lerna to moon
GarthDB Dec 21, 2023
aaaf4cc
refactor: updated parcel
GarthDB Feb 9, 2024
e5c447e
refactor: prettier
GarthDB Feb 9, 2024
9e8995e
feat: add prettier config and test npm script
karstens Feb 23, 2024
61653ec
fix: remove obsolete npm scripts for prettier
karstens Feb 28, 2024
4abc85a
fix: run prettier on packages/contrast-color/**
karstens Feb 28, 2024
fc18950
fix: remove package-lock.json
karstens Feb 28, 2024
7b60e29
fix: prettier on docs/ui/moon.yml
karstens Feb 28, 2024
fd7bc41
fix: run prettier on packages/**/*.*
karstens Feb 29, 2024
4b053a9
fix: little improvements
karstens Feb 29, 2024
ad19474
fix: add husky pre-commit for git hook
karstens Feb 29, 2024
d04b307
fix: add husky/_ ti .gitignore
karstens Feb 29, 2024
cb6b9a2
refactor: move lint-staged to pnpm script
GarthDB Feb 29, 2024
cdb0dbe
fix: added husky commitlint workflow
GarthDB Feb 29, 2024
2fbbd83
chore: added changeset config
GarthDB Feb 29, 2024
2233d88
chore: updated branch from monorepo
GarthDB Feb 29, 2024
b029a03
fix: added .gitignore to .husky
GarthDB Feb 29, 2024
4871ccb
fix: added pre-commit husky script
GarthDB Feb 29, 2024
ea2f3ad
Merge branch 'monorepo' into karstens/fix--little-improvements
GarthDB Feb 29, 2024
8c91134
fix: replace npx with pnpm in node scripts
karstens Mar 1, 2024
e17c4a2
fix: .husky/commit-msg hook was ignored because it is not set as exec…
karstens Mar 1, 2024
30ab9ac
ci: added simple github workflow to running tests
GarthDB Mar 1, 2024
a2b9d9f
refactor: moved scripts to moon tasks to make it easy to test in CI
GarthDB Mar 5, 2024
27c7ea7
Merge pull request #232 from adobe/karstens/fix--little-improvements
GarthDB Mar 5, 2024
3f1033b
chore: update moon config to use Node v20.11
karstens Mar 7, 2024
cfc05ac
Merge pull request #233 from adobe/karstens/fix--set-node-version-to-lts
GarthDB Mar 7, 2024
2e0df02
chore: updated workflow
GarthDB Mar 7, 2024
6c1d26d
test: fix test input for contrast-colors
GarthDB Mar 14, 2024
c761702
chore: update copyright
GarthDB Mar 14, 2024
5dc8fc0
ci: added release automation
GarthDB Mar 14, 2024
e90f4c3
refactor: formatting
GarthDB Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": []
}
8 changes: 8 additions & 0 deletions .changeset/proud-lies-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@adobe/leonardo-contrast-colors": patch
---

* Migrated from Lerna to Moon for monorepo management.
* Setting up Changeset for release management
* Setting up automated releases on NPM
* Migrate from Jest to Ava for better module support
14 changes: 8 additions & 6 deletions .github/ISSUE_TEMPLATE/---bug--npm-packages--.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,32 @@ about: Report a problem with the @leonardo-contrast-colors module
title: ''
labels: bug
assignees: ''

---

## Description
<!-- Describe the problem you're having -->

<!-- Describe the problem you're having -->

## Steps to reproduce
<!-- Include code examples or error messages if you have them -->

<!-- Include code examples or error messages if you have them -->

## Expected behavior
<!-- Describe what you expected to happen -->

<!-- Describe what you expected to happen -->

## Screenshots

<!-- If applicable, add screenshots to help explain the problem -->

## Leonardo package and version
<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->

<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->

## Environment
- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

## Additional context

<!-- Provide any additional information that might help us debug the issue -->
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/--bug-web-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ about: Report a problem with the Leonardo web interface
title: ''
labels: UI, bug
assignees: ''

---

## Description
<!-- Describe the problem you're having -->

<!-- Describe the problem you're having -->

## Steps to reproduce

1. Go to http://leonardocolor.io/
2. Click on ...
3. Observe ...


## Expected behavior
<!-- Describe what you expected to happen -->

<!-- Describe what you expected to happen -->

## Screenshots
<!-- If applicable, add screenshots to help explain the problem -->

<!-- If applicable, add screenshots to help explain the problem -->

## Environment
- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

- **Browser(s) and OS(s):** <!-- Chrome 75.0.3770.142 on Win 10 -->

## Additional context

<!-- Provide any additional information that might help us debug the issue -->
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/--feature-request--npm-packages-.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
name: "✨ Feature request [npm packages]"
name: '✨ Feature request [npm packages]'
about: Suggest a new feature for the Leonardo npm modules
title: ''
labels: enhancement, npm packages
assignees: ''

---

## Description
<!-- Describe your suggested feature in detail -->

<!-- Describe your suggested feature in detail -->

## Why do you need this feature?
<!-- Tell us what this solves or why this is important to your use case -->

<!-- Tell us what this solves or why this is important to your use case -->

## Leonardo package and version
<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->

<!--ie: **@leonardo-contrast-colors version:** 2.13.0 -->

## Additional context

<!-- Add any other context, workarounds, or screenshots about your request -->
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/--feature-web-tool.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
name: "✨ Feature request [Web Tool]"
name: '✨ Feature request [Web Tool]'
about: Suggest a new feature for the Leonardo web interface
title: ''
labels: UI, enhancement
assignees: ''

---

## Description
<!-- Describe your suggested feature in detail -->

<!-- Describe your suggested feature in detail -->

## Why do you need this feature?
<!-- Tell us what this solves or why this is important to your use case -->

<!-- Tell us what this solves or why this is important to your use case -->

## Additional context

<!-- Add any other context, workarounds, or screenshots about your request -->
8 changes: 5 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<!-- Summarize your changes in the Title field -->

## Description

<!--
Note: Before sending a pull request, make sure there's an issue for what you're changing
- Search for issues: https://github.com/adobe/leonardo/issues
- If there's no issue, file it: https://github.com/adobe/leonardo/issues/new/choose
-->
<!-- Describe what you changed and link to the relevant issue(s) -->


## Motivation
<!-- How do your changes support this project's goals? -->

<!-- How do your changes support this project's goals? -->

## Screenshots
<!-- If applicable, add screenshots to show what you changed -->

<!-- If applicable, add screenshots to show what you changed -->

## To-do list

<!-- Put an "x" to indicate you've done each of the following -->

- [ ] I have read the [CONTRIBUTING document](/.github/CONTRIBUTING.md).
<!-- If this pull request isn't ready, add any remaining tasks here -->
- [ ] This pull request is ready to merge.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI
on: pull_request
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: moonrepo/setup-toolchain@v0
with:
auto-install: true
- run: moon ci
- uses: 'moonrepo/run-report-action@v1'
if: success() || failure()
with:
access-token: ${{ secrets.MOON_GH_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

permissions:
id-token: write

on:
push:
branches:
- main
- beta

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: moonrepo/setup-toolchain@v0
with:
auto-install: true
- run: moon run :build --query "projectSource~packages/*"
- name: Publish
id: changesets
uses: changesets/action@v1
with:
commit: 'chore: release'
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
dist/
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.nyc_output/
.cache/
.DS_Store
.DS_Store
# moon
.moon/cache
.moon/docker
.parcel-cache

# husky
.husky/_
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "packages/contrast-colors/SAPC-APCA"]
path = packages/contrast-colors/SAPC-APCA
url = [email protected]:Myndex/SAPC-APCA.git
[submodule "packages/ui/src/c3"]
path = packages/ui/src/c3
[submodule "docs/ui/src/c3"]
path = docs/ui/src/c3
url = [email protected]:StanfordHCI/c3.git
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
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"

pnpm --no-install commitlint --edit ""
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm run pre-commit
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"docs/**/*.{js,jsx,ts,tsx,json,yml,yaml,md}": ["prettier --write"],
"packages/**/*.{js,jsx,ts,tsx,json,yml,yaml,md}": ["prettier --write"]
}
41 changes: 41 additions & 0 deletions .moon/toolchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# https://moonrepo.dev/docs/config/toolchain
$schema: 'https://moonrepo.dev/schemas/toolchain.json'

# Extend and inherit an external configuration file. Must be a valid HTTPS URL or file system path.
# extends: './shared/toolchain.yml'

# Configures Node.js within the toolchain. moon manages its own version of Node.js
# instead of relying on a version found on the host machine. This ensures deterministic
# and reproducible builds across any machine.
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'

# The package manager to use when managing dependencies.
# Accepts "npm" (default), "pnpm", or "yarn".
packageManager: 'pnpm'

# The version of the package manager (above) to use.
pnpm:
version: '8.15.4'

# Add `node.version` as a constraint in the root `package.json` `engines`.
addEnginesConstraint: true

# Dedupe dependencies after the lockfile has changed.
dedupeOnLockfileChange: true

# Version format to use when syncing dependencies within the project's `package.json`.
# dependencyVersionFormat: 'workspace'

# 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

# Sync a project's `dependsOn` as dependencies within the project's `package.json`.
syncProjectWorkspaceDependencies: true

# Sync `node.version` to a 3rd-party version manager's config file.
# Accepts "nodenv" (.node-version), "nvm" (.nvmrc), or none.
# syncVersionManagerConfig: 'nvm'
29 changes: 29 additions & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# https://moonrepo.dev/docs/config/workspace
$schema: "https://moonrepo.dev/schemas/workspace.json"

# Require a specific version of moon while running commands, otherwise fail.
# versionConstraint: '>=1.0.0'

# Extend and inherit an external configuration file. Must be a valid HTTPS URL or file system path.
# extends: './shared/workspace.yml'

# REQUIRED: A map of all projects found within the workspace, or a list or file system globs.
# When using a map, each entry requires a unique project ID as the map key, and a file system
# path to the project folder as the map value. File paths are relative from the workspace root,
# and cannot reference projects located outside the workspace boundary.
projects:
- "docs/*"
- "packages/*"

# Configures the version control system to utilize within the workspace. A VCS
# is required for determining touched (added, modified, etc) files, calculating file hashes,
# computing affected files, and much more.
vcs:
# The client to use when managing the repository.
# Accepts "git". Defaults to "git".
manager: "git"

# The default branch (master/main/trunk) in the repository for comparing the
# local branch against. For git, this is is typically "master" or "main",
# and must include the remote prefix (before /).
defaultBranch: "monorepo"
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
*.min.js
*.map
*.snap
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"tabWidth": 2,
"printWidth": 256,
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "none"
}
Loading