Skip to content
This repository was archived by the owner on Dec 30, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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).
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@latest/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "terminal-nerds/snippets" }],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 1 addition & 1 deletion .depcheckrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ignore-bin-package": false,
"ignores": ["@semantic-release/*", "@terminal-nerds/*", "@types/node", "browserslist", "lint-staged"],
"ignores": ["@changesets/*", "@terminal-nerds/*", "@types/node", "browserslist", "lint-staged"],
"skip-missing": false
}
1 change: 1 addition & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"groupName": "project tools & linters",
"addLabels": ["🧰 project"],
"packagePatterns": [
"@changesets/*",
"@terminal-nerds/*-config",
"@types/node",
"all-contributors-cli",
Expand Down
60 changes: 32 additions & 28 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,22 @@ env:
jobs:
lint_depcheck:
# Analyze dependencies usage in package.json files
name: Lint / depcheck
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-job.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-job.yml@main
name: Lint
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-script.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-script.yml@main
with:
step-name: Execute package.json script
job-name: depcheck
step-name: Lint dependencies with depcheck
run: pnpm lint:deps

lint_eslint:
# Analyze the JavaScript codebase
name: Lint / ESLint
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-job.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-job.yml@main
name: Lint
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-script.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-script.yml@main
with:
step-name: Execute ESLint CLI task
job-name: ESLint
step-name: Lint with ESLint
# https://eslint.org/docs/user-guide/command-line-interface
run: >
DEBUG="eslint:cli-engine"
Expand All @@ -54,11 +56,12 @@ jobs:

lint_markdownlint:
# Analyze the markdownlint files
name: Lint / markdownlint
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-job.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-job.yml@main
name: Lint
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-script.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-script.yml@main
with:
step-name: Execute markdownlint CLI task
job-name: markdownlint
step-name: Lint with markdownlint
# https://github.com/igorshubovych/markdownlint-cli#usage
run: >
pnpm markdownlint .
Expand All @@ -68,11 +71,12 @@ jobs:

lint_prettier:
# Analyze the code format style
name: Lint / Prettier
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-job.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-job.yml@main
name: Lint
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-script.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-script.yml@main
with:
step-name: Execute "pretty-quick" CLI task
job-name: Prettier
step-name: Lint code format with "pretty-quick"
# https://github.com/azz/pretty-quick#usage
run: >
pnpm pretty-quick
Expand All @@ -81,31 +85,32 @@ jobs:

lint_syncpack:
# Analyze the package.json files to find dependencies mismatches
name: Lint / syncpack
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-job.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-job.yml@main
name: Lint
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/nodejs-script.yml
uses: terminal-nerds/.github/.github/workflows/nodejs-script.yml@main
with:
step-name: Execute syncpack CLI task
job-name: syncpack
step-name: Lint package.json file(s) with syncpack
# https://github.com/JamieMason/syncpack
run: pnpm syncpack list-mismatches

security_codeql:
if: github.ref_name == 'main'
name: Security / CodeQL
name: Security
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/codeql.yml
uses: terminal-nerds/.github/.github/workflows/codeql.yml@main

security_git-guardian:
if: github.ref_name == 'main'
name: Security / Git Guardian
name: Security
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/git-guardian.yml
uses: terminal-nerds/.github/.github/workflows/git-guardian.yml@main
secrets:
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}

# security_snyk:
# if: github.ref_name == 'main'
# name: Security / Snyk
# name: Security
# # https://github.com/terminal-nerds/.github/blob/main/.github/workflows/snyk.yml
# uses: terminal-nerds/.github/.github/workflows/snyk.yml@main
# secrets:
Expand All @@ -122,10 +127,11 @@ jobs:
script-build: build

test:
name: Test / Unit
name: Test
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/test.yml
uses: terminal-nerds/.github/.github/workflows/test.yml@main
with:
job-name: Unit
script-test: pnpm test:unit
with-coverage: true

Expand All @@ -144,9 +150,7 @@ jobs:
build,
test,
]
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/semantic-release.yml
uses: terminal-nerds/.github/.github/workflows/semantic-release.yml@main
with:
script-release: pnpm release
# https://github.com/terminal-nerds/.github/blob/main/.github/workflows/release.yml
uses: terminal-nerds/.github/.github/workflows/release.yml@main
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @terminal-nerds/snippets<!-- markdownlint-disable line-length list-marker-space no-duplicate-header ul-style ul-indent no-bare-urls -->
36 changes: 16 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
"private": true,
"type": "module",
"name": "@terminal-nerds/snippets",
"version": "0.0.0-development",
"version": "0.0.0",
"description": "@terminal-nerds reusable snippets.",
"keywords": [
"snippets"
"snippets",
"typescript"
],
"license": "MIT",
"homepage": "https://github.com/terminal-nerds/snippets",
"repository": {
"type": "git",
"url": "https://github.com/terminal-nerds/snippets.git",
"directory": "/"
},
"repository": "terminal-nerds/snippets.git",
"bugs": "https://github.com/terminal-nerds/snippets/issues",
"engines": {
"node": ">=18"
Expand All @@ -25,35 +22,35 @@
],
"scripts": {
"build": "tsup",
"changelog": "pnpm changeset add",
"clean": "concurrently \"pnpm:clean:*\" --group --timings",
"clean:build": "del \"./coverage\" \"./dist\"",
"clean:build": "del \"./dist\"",
"clean:cache": "del \"./node_modules/.cache\"",
"clean:test": "del \"./coverage\"",
"dev:test": "vitest watch --ui",
"dev:package": "tsup --watch",
"format": "concurrently \"pnpm:format:*\" --group --timings",
"format:prettier": "pretty-quick --branch main --pattern \"**/*\" --verbose",
"format:syncpack": "syncpack format",
"dev:pkg": "tsup --watch",
"fix": "concurrently \"pnpm:fix:*\" --group --timings",
"fix:format": "pretty-quick --branch main --pattern \"**/*\" --verbose",
"fix:js": "DEBUG=\"eslint:cli-engine\" eslint . --ext .cjs,.json,.yml,.yaml --cache --cache-location \"./node_modules/.cache/eslint\" --fix",
"fix:md": "markdownlint . --dot --ignore-path \"./.gitignore\" --fix",
"fix:pkg": "syncpack format ; syncpack fix-mismatches",
"lint": "concurrently \"pnpm:lint:*\" --group --timings",
"lint:deps": "depcheck",
"lint:format": "pretty-quick --branch main --pattern \"**/*\" --verbose --check",
"lint:js": "DEBUG=\"eslint:cli-engine\" eslint . --ext .cjs,.json,.yml,.yaml --cache --cache-location \"./node_modules/.cache/eslint\"",
"lint:md": "markdownlint . --dot --ignore-path \"./.gitignore\"",
"lint:pkg": "syncpack list-mismatches",
"lint:types": "tsc --noEmit",
"prepare": "husky install",
"preinstall": "npx only-allow pnpm",
"release": "semantic-release",
"test:unit": "vitest run --dir \"./source\""
},
"dependencies": {
"zod": "3.20.2"
},
"devDependencies": {
"@semantic-release/changelog": "6.0.2",
"@semantic-release/commit-analyzer": "9.0.2",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "8.0.7",
"@semantic-release/npm": "9.0.1",
"@semantic-release/release-notes-generator": "10.0.3",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.0",
"@terminal-nerds/browserslist-config": "0.1.1",
"@terminal-nerds/eslint-config": "0.10.3",
"@terminal-nerds/lint-staged-config": "0.1.1",
Expand All @@ -74,7 +71,6 @@
"markdownlint-cli": "0.32.2",
"prettier": "2.8.1",
"pretty-quick": "3.1.3",
"semantic-release": "19.0.5",
"syncpack": "8.4.11",
"tsup": "6.5.0",
"typescript": "4.9.4",
Expand Down
Loading