-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add prettier config and test npm script * fix: remove obsolete npm scripts for prettier * fix: run prettier on packages/contrast-color/** * fix: remove package-lock.json * replaced yarn with pnpm everywhere * make nodeJS version flexible * fix: add husky pre-commit for git hook * refactor: move lint-staged to pnpm script * fix: added husky commitlint workflow * chore: added changeset config * fix: added pre-commit husky script * fix: replace npx with pnpm in node scripts * ci: added simple github workflow to running tests * refactor: moved scripts to moon tasks to make it easy to test in CI * chore: update moon config to use Node v20.11 * test: fix test input for contrast-colors * chore: update copyright * ci: added release automation --------- Co-authored-by: Frank Karstens <[email protected]>
- Loading branch information
Showing
283 changed files
with
19,056 additions
and
45,406 deletions.
There are no files selected for viewing
This file contains 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
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) |
This file contains 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
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": [] | ||
} |
This file contains 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
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 |
This file contains 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
This file contains 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
This file contains 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
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 --> |
This file contains 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
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 --> |
This file contains 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
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. |
This file contains 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
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 }} |
This file contains 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
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 }} |
This file contains 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
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/_ |
This file contains 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
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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains 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
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 "" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm run pre-commit |
This file contains 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
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"] | ||
} |
This file contains 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
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' |
This file contains 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
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" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
*.min.js | ||
*.map | ||
*.snap |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"tabWidth": 2, | ||
"printWidth": 256, | ||
"singleQuote": true, | ||
"bracketSpacing": false, | ||
"trailingComma": "none" | ||
} |
Oops, something went wrong.