diff --git a/.changeset/serious-buckets-think.md b/.changeset/serious-buckets-think.md new file mode 100644 index 0000000..bb591ea --- /dev/null +++ b/.changeset/serious-buckets-think.md @@ -0,0 +1,5 @@ +--- +"@spear-ai/tailwind-config": patch +--- + +Updated Turbo tasks. diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index b8cc253..2689cba 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -2,19 +2,19 @@ version: 2 updates: - directory: / labels: - - 🌋 technical debt + - 🔧 maintenance package-ecosystem: github-actions schedule: interval: monthly - directory: / labels: - - 🌋 technical debt + - 🔧 maintenance package-ecosystem: npm schedule: interval: monthly - directory: /packages/tailwind-config labels: - - 🌋 technical debt + - 🔧 maintenance package-ecosystem: npm schedule: interval: monthly diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 31ffc3e..effde0b 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -1,4 +1,4 @@ -name: Checks +name: Build and check on: pull_request: types: @@ -20,7 +20,7 @@ jobs: TURBO_TEAM: ${{ vars.TURBO_TEAM }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} steps: - - name: Checkout Git repository + - name: Checkout repository uses: actions/checkout@v4.1.1 with: fetch-depth: 2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 40e0eab..117417e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest outputs: should-deploy: ${{ steps.changesets.outputs.hasChangesets == 'false' }} + permissions: write-all steps: - name: Checkout repository uses: actions/checkout@v4.1.1 @@ -41,6 +42,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} with: - title: "ci: release 🚀" - commit: "ci: release 🚀" - publish: yarn run publish-packages + title: Release 🚀 + version: yarn run version + commit: Release 🚀 diff --git a/.yarn/cache/@commitlint-config-conventional-npm-18.6.0-de9e741038-96f96966ef.zip b/.yarn/cache/@commitlint-config-conventional-npm-18.6.0-de9e741038-96f96966ef.zip deleted file mode 100644 index 7242678..0000000 Binary files a/.yarn/cache/@commitlint-config-conventional-npm-18.6.0-de9e741038-96f96966ef.zip and /dev/null differ diff --git a/.yarn/cache/@spear-ai-commitlint-config-npm-3.1.0-aa17bc306e-630eb170e0.zip b/.yarn/cache/@spear-ai-commitlint-config-npm-3.1.0-aa17bc306e-630eb170e0.zip new file mode 100644 index 0000000..c0c58f7 Binary files /dev/null and b/.yarn/cache/@spear-ai-commitlint-config-npm-3.1.0-aa17bc306e-630eb170e0.zip differ diff --git a/.yarn/cache/conventional-changelog-conventionalcommits-npm-7.0.2-f878f86efe-3cc6586ac5.zip b/.yarn/cache/conventional-changelog-conventionalcommits-npm-7.0.2-f878f86efe-3cc6586ac5.zip deleted file mode 100644 index 095ad33..0000000 Binary files a/.yarn/cache/conventional-changelog-conventionalcommits-npm-7.0.2-f878f86efe-3cc6586ac5.zip and /dev/null differ diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 5d080f0..8ddf3a3 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/commitlint.config.ts b/commitlint.config.ts new file mode 100644 index 0000000..ae5563e --- /dev/null +++ b/commitlint.config.ts @@ -0,0 +1,7 @@ +import type { UserConfig } from "@commitlint/types"; + +const commitlintConfig: UserConfig = { + extends: ["@spear-ai/commitlint-config"], +}; + +export default commitlintConfig; diff --git a/eslint.config.js b/eslint.config.js index 28be05d..54e7397 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,5 +1,3 @@ -/* eslint-disable import/no-default-export */ - import { baseEslintConfig, prettierConfig } from "@spear-ai/eslint-config"; /** @type {import("eslint").Linter.FlatConfig} */ diff --git a/npmpackagejsonlint.config.cjs b/npmpackagejsonlint.config.cjs index daf6dc8..8077edf 100644 --- a/npmpackagejsonlint.config.cjs +++ b/npmpackagejsonlint.config.cjs @@ -3,5 +3,6 @@ module.exports = { rules: { "prefer-absolute-version-dependencies": "off", "prefer-absolute-version-devDependencies": "off", + "prefer-alphabetical-scripts": "off", }, }; diff --git a/package.json b/package.json index 16fad2b..5732dda 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "@changesets/changelog-github": "0.5.0", "@changesets/cli": "2.27.1", "@commitlint/cli": "18.6.0", - "@commitlint/config-conventional": "18.6.0", + "@commitlint/types": "18.6.0", + "@spear-ai/commitlint-config": "3.1.0", "@spear-ai/eslint-config": "17.1.0", "@spear-ai/npm-package-json-lint-config": "3.1.0", "@spear-ai/prettier-config": "2.1.0", @@ -27,7 +28,7 @@ "turbo": "1.12.3", "typescript": "5.3.3" }, - "license": "", + "license": "UNLICENSED", "packageManager": "yarn@4.1.0", "private": true, "repository": { @@ -35,19 +36,21 @@ "url": "https://github.com/spear-ai/ui.git" }, "scripts": { + "version": "changeset version && yarn workspaces foreach -A run sync-version", "build": "yarn dlx turbo build", - "check": "yarn dlx turbo root:check-yarn-cache root:lint:eslint root:lint:npm lint:eslint lint:prettier lint:npm", - "fix": "yarn dlx turbo root:fix fix", + "commitlint:check": "commitlint --from=HEAD^1", + "eslint:check": "eslint --max-warnings 0 .", + "eslint:fix": "yarn eslint:check --fix", "github-actions:push": "act push -s GH_PAT=$GH_PAT -s GITHUB_TOKEN=$GH_PAT -s NPM_TOKEN=$NPM_TOKEN", "github-actions:push:release-tag": "act push -e .github/test-events/push-release-tag.json -s GH_PAT=$GH_PAT -s GITHUB_TOKEN=$GH_PAT", - "publish-packages": "yarn publish-packages:npm && yarn publish-packages:github && yarn changeset tag", + "npmpkgjsonlint:check": "npmPkgJsonLint .", + "prettier:check": "prettier --check .", + "prettier:fix": "prettier --write .", + "publish-packages": "yarn run publish-packages:npm && yarn run publish-packages:github && yarn run publish-packages:custom && yarn changeset tag", + "publish-packages:custom": "yarn workspaces foreach -A run publish-package", "publish-packages:github": "npm_config_registry=https://npm.pkg.github.com changeset publish --no-git-tag", "publish-packages:npm": "changeset publish --no-git-tag", - "root:check-yarn-cache": "yarn install --check-cache --immutable --immutable-cache", - "root:fix": "yarn root:lint:eslint --fix", - "root:lint:eslint": "eslint --max-warnings 0 .", - "root:lint:npm": "npmPkgJsonLint .", - "root:lint:prettier": "prettier --check ." + "typescript:check": "tsc --noEmit" }, "workspaces": [ "packages/*" diff --git a/packages/tailwind-config/package.json b/packages/tailwind-config/package.json index e9c922e..4745f57 100644 --- a/packages/tailwind-config/package.json +++ b/packages/tailwind-config/package.json @@ -14,7 +14,7 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.10", - "change-case": "5.4.2", + "change-case": "^5.4.2", "culori": "^4.0.1", "tailwind-scrollbar": "^3.0.5", "tailwindcss-3d": "^1.0.4", @@ -51,16 +51,14 @@ "url": "https://github.com/spear-ai/ui.git" }, "scripts": { - "build": "tsup src --clean --dts --format cjs,esm src/index.ts", - "dev": "yarn build --watch", - "fix": "yarn fix:eslint && yarn fix:prettier", - "fix:eslint": "yarn lint:eslint --fix", - "fix:prettier": "prettier --write .", - "lint": "yarn lint:eslint && yarn lint:prettier && yarn lint:npm", - "lint:eslint": "eslint --max-warnings 0 .", - "lint:npm": "npmPkgJsonLint .", - "lint:prettier": "prettier --check .", - "typecheck": "tsc --noEmit" + "build": "tsup src --clean --dts --format cjs,esm", + "dev": "yarn run build --watch", + "eslint:check": "eslint --max-warnings 0 .", + "eslint:fix": "yarn eslint:check --fix", + "npmpkgjsonlint:check": "npmPkgJsonLint .", + "prettier:check": "prettier --check .", + "prettier:fix": "prettier --write .", + "typescript:check": "tsc --noEmit" }, "types": "./dist/index.d.ts" } diff --git a/packages/tailwind-config/tsconfig.json b/packages/tailwind-config/tsconfig.json index 4cc1df0..0450b97 100644 --- a/packages/tailwind-config/tsconfig.json +++ b/packages/tailwind-config/tsconfig.json @@ -11,6 +11,7 @@ "outDir": "bin", "pretty": true, "resolveJsonModule": true, + "skipLibCheck": true, "sourceMap": true, "strict": true, "stripInternal": true, diff --git a/prettier.config.cjs b/prettier.config.cjs index 3f846f1..e21806a 100644 --- a/prettier.config.cjs +++ b/prettier.config.cjs @@ -1,5 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ - const prettierConfig = require("@spear-ai/prettier-config"); module.exports = prettierConfig; diff --git a/tsconfig.json b/tsconfig.json index 2d62da8..472b3c1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,7 @@ "outDir": "bin", "pretty": true, "resolveJsonModule": true, + "skipLibCheck": true, "sourceMap": true, "strict": true, "stripInternal": true, diff --git a/turbo.json b/turbo.json index e330cfd..fe134b6 100644 --- a/turbo.json +++ b/turbo.json @@ -1,55 +1,45 @@ { "$schema": "https://turbo.build/schema.json", "pipeline": { - "//#root:check": {}, - "//#root:check-yarn-cache": { - "inputs": [".yarn/cache", "yarn.lock"] - }, + "//#commitlint:check": {}, + "//#eslint:check": {}, + "//#eslint:fix": {}, + "//#npmpkgjsonlint:check": {}, + "//#prettier:check": {}, + "//#prettier:fix": {}, "//#root:fix": { "dependsOn": ["^build"] }, - "//#root:lint:eslint": { - "dependsOn": ["^build"], - "inputs": [ - "**/*.code-workspace", - "**/*.cjs", - "**/*.js", - "**/*.json", - "**/*.json5", - "**/*.jsonc", - "**/*.mjs", - "**/*.toml", - "**/*.ts", - "**/*.yaml", - "**/*.yml", - "eslint.config.js", - "tsconfig.json" - ] - }, - "//#root:lint:npm": { - "dependsOn": ["^build"], - "inputs": [".npmpackagejsonlintignore", "npmpackagejsonlint.config.cjs", "package.json"] - }, + "//#typescript:check": {}, "build": { "dependsOn": ["^build"], + "dotEnv": [".env", ".env.local", ".env.production", ".env.production.local"], "outputs": ["build/**", "dist/**"] }, "check": { - "dependsOn": ["^build"] + "dependsOn": [ + "//#commitlint:check", + "//#eslint:check", + "//#npmpkgjsonlint:check", + "//#prettier:check", + "eslint:check", + "npmpkgjsonlint:check", + "prettier:check", + "typescript:check" + ] + }, + "commitlint:check": { + "cache": false }, "dev": { "cache": false, "persistent": true }, - "fix": { - "cache": false, - "dependsOn": ["^build"] - }, - "lint:eslint": { + "eslint:check": { "dependsOn": ["^build"], "inputs": [ - "**/*.code-workspace", "**/*.cjs", + "**/*.code-workspace", "**/*.graphql", "**/*.js", "**/*.json", @@ -67,11 +57,19 @@ "tsconfig.json" ] }, - "lint:npm": { + "eslint:fix": { + "cache": false, + "dependsOn": ["^build"] + }, + "fix": { + "cache": false, + "dependsOn": ["//#eslint:fix", "eslint:fix", "//#prettier:fix", "prettier:fix"] + }, + "npmpkgjsonlint:check": { "dependsOn": ["^build"], "inputs": [".npmpackagejsonlintignore", "npmpackagejsonlint.config.cjs", "package.json"] }, - "lint:prettier": { + "prettier:check": { "dependsOn": ["^build"], "inputs": [ "**/*.cjs", @@ -87,9 +85,19 @@ "**/*.toml", "**/*.ts", "**/*.tsx", + "**/*.yaml", + "**/*.yml", ".prettierignore", - "prettier.config.cjs" + "prettier.config.*" ] + }, + "prettier:fix": { + "cache": false, + "dependsOn": ["^build"] + }, + "typescript:check": { + "dependsOn": ["^build"], + "inputs": ["**/*.cjs", "**/*.js", "**/*.json", "**/*.mjs", "**/*.ts", "**/*.tsx", "tsconfig.json"] } } } diff --git a/workspace.code-workspace b/workspace.code-workspace index 69e6e07..2053dfa 100644 --- a/workspace.code-workspace +++ b/workspace.code-workspace @@ -8,59 +8,59 @@ "sleistner.vscode-fileutils", "tyriar.sort-lines", "wix.vscode-import-cost", - "yzhang.markdown-all-in-one" + "yzhang.markdown-all-in-one", ], - "unwantedRecommendations": [] + "unwantedRecommendations": [], }, "folders": [ { "name": "spear-ai/ui", - "path": "." + "path": ".", }, { "name": "spear-ai/tailwind-config", - "path": "packages/tailwind-config" - } + "path": "packages/tailwind-config", + }, ], "settings": { "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[json5]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[markdown]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[toml]": { - "editor.tabSize": 2 + "editor.tabSize": 2, }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.tabSize": 2 + "editor.tabSize": 2, }, "editor.autoClosingQuotes": "always", "editor.codeActionsOnSave": { - "source.fixAll": "explicit" + "source.fixAll": "explicit", }, "editor.formatOnSave": true, "editor.quickSuggestions": { - "strings": true + "strings": true, }, "eslint.experimental.useFlatConfig": true, "eslint.validate": [ @@ -73,10 +73,10 @@ "toml", "typescript", "typescriptreact", - "yaml" + "yaml", ], "files.insertFinalNewline": true, "files.trimFinalNewlines": true, - "files.trimTrailingWhitespace": true - } + "files.trimTrailingWhitespace": true, + }, } diff --git a/yarn.lock b/yarn.lock index 11a98f0..82ff902 100644 --- a/yarn.lock +++ b/yarn.lock @@ -472,15 +472,6 @@ __metadata: languageName: node linkType: hard -"@commitlint/config-conventional@npm:18.6.0": - version: 18.6.0 - resolution: "@commitlint/config-conventional@npm:18.6.0" - dependencies: - conventional-changelog-conventionalcommits: "npm:^7.0.2" - checksum: 10/96f96966efe2dca58fa876668c3ef34326d617a78bc467bd163a232aec7a541e6da5f462bb76b6dcecf0344bec8f82e02ca89b3b64f60527084289c58bfc9b84 - languageName: node - linkType: hard - "@commitlint/config-validator@npm:^18.6.0": version: 18.6.0 resolution: "@commitlint/config-validator@npm:18.6.0" @@ -636,7 +627,7 @@ __metadata: languageName: node linkType: hard -"@commitlint/types@npm:^18.6.0": +"@commitlint/types@npm:18.6.0, @commitlint/types@npm:^18.6.0": version: 18.6.0 resolution: "@commitlint/types@npm:18.6.0" dependencies: @@ -1552,6 +1543,15 @@ __metadata: languageName: node linkType: hard +"@spear-ai/commitlint-config@npm:3.1.0": + version: 3.1.0 + resolution: "@spear-ai/commitlint-config@npm:3.1.0" + peerDependencies: + commitlint: ^18.4.3 + checksum: 10/630eb170e09473f66fcde7d5d2a6a0123879fc58f3914cea5f687273a7f365b8870680cfd088a1bb2734bd559882deb1ae0a5bf3d5b4876c654adb38200862d9 + languageName: node + linkType: hard + "@spear-ai/eslint-config@npm:17.1.0": version: 17.1.0 resolution: "@spear-ai/eslint-config@npm:17.1.0" @@ -1639,7 +1639,7 @@ __metadata: "@types/culori": "npm:2.1.0" "@types/mertasan__tailwindcss-variables": "npm:2.6.4" autoprefixer: "npm:10.4.17" - change-case: "npm:5.4.2" + change-case: "npm:^5.4.2" culori: "npm:^4.0.1" eslint: "npm:8.56.0" graphql: "npm:16.8.1" @@ -1667,7 +1667,8 @@ __metadata: "@changesets/changelog-github": "npm:0.5.0" "@changesets/cli": "npm:2.27.1" "@commitlint/cli": "npm:18.6.0" - "@commitlint/config-conventional": "npm:18.6.0" + "@commitlint/types": "npm:18.6.0" + "@spear-ai/commitlint-config": "npm:3.1.0" "@spear-ai/eslint-config": "npm:17.1.0" "@spear-ai/npm-package-json-lint-config": "npm:3.1.0" "@spear-ai/prettier-config": "npm:2.1.0" @@ -2748,7 +2749,7 @@ __metadata: languageName: node linkType: hard -"change-case@npm:5.4.2": +"change-case@npm:^5.4.2": version: 5.4.2 resolution: "change-case@npm:5.4.2" checksum: 10/0724f0ebb65d17ff1de816cdd7f5f3e4e85aed567128a14d1a7c06f3677e43810e2d4cf0a9ebf35de8636a4bb5d00458dad636a9351fd19f4dfddda7fb373e00 @@ -2959,15 +2960,6 @@ __metadata: languageName: node linkType: hard -"conventional-changelog-conventionalcommits@npm:^7.0.2": - version: 7.0.2 - resolution: "conventional-changelog-conventionalcommits@npm:7.0.2" - dependencies: - compare-func: "npm:^2.0.0" - checksum: 10/3cc6586ac57cc54c0595b28ae22e8b674c970034bad35e467f71aba395278a6ef43351cfbf782a5fc33eb13ed4ad843a145b89ad1444f5fa571e3bf9c1d5519b - languageName: node - linkType: hard - "conventional-commits-parser@npm:^5.0.0": version: 5.0.0 resolution: "conventional-commits-parser@npm:5.0.0"