Skip to content

Commit

Permalink
chore: does this work with esm?
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Martirosian committed May 7, 2024
1 parent 38af828 commit 3bb0ebf
Show file tree
Hide file tree
Showing 35 changed files with 106,338 additions and 3,338 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
lib/**

lib
pnpm-lock.yaml
16 changes: 0 additions & 16 deletions .github/codecov.yaml

This file was deleted.

13 changes: 7 additions & 6 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version: 2

updates:
- package-ecosystem: 'github-actions'
directory: '/'
- directory: '/'
labels:
- 'dependencies'
- 'github-actions'
package-ecosystem: 'github-actions'
schedule:
interval: weekly
day: saturday
interval: weekly
time: '07:00'
timezone: Etc/UTC
labels:
- 'dependencies'
- 'github-actions'
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: ci

on:
push:
pull_request:
branches:
- trunk
paths-ignore:
- README.md
- LICENSE
pull_request:
push:
branches:
- trunk
paths-ignore:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: dependency-review

on:
- pull_request

permissions:
contents: read

jobs:
context:
uses: escapace/workflows/.github/workflows/dependency-review.yaml@trunk
23 changes: 0 additions & 23 deletions .github/workflows/dependency-review.yml

This file was deleted.

38 changes: 19 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
/lib/*
!/lib/cjs

.DS_Store
.awcache
.idea
.manage_modules
.rpt2_cache
.vscode

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
# NOTE: Don't modify this file. Place .gitignore files in relevant subdirectories.

!lib/node
!lib/types

# Logs
logs
Expand Down Expand Up @@ -71,6 +59,9 @@ web_modules/
# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand All @@ -86,10 +77,12 @@ web_modules/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
# dotenv environment variable files
.env
.env.test
.env.production
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand All @@ -112,6 +105,13 @@ dist
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

18 changes: 0 additions & 18 deletions .husky/pre-commit

This file was deleted.

4 changes: 0 additions & 4 deletions .lintstagedrc.json

This file was deleted.

16 changes: 7 additions & 9 deletions .ls-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
ls:
.config.ts: kebab-case
.d.json.ts: kebab-case
.d.ts: kebab-case
.spec.ts: kebab-case
.ts: kebab-case

ignore:
- coverage
- .circleci
- .eslintrc.json
- .git
- .github
- .manage_modules
- .vscode
- lib
- node_modules
ls:
.d.ts: kebab-case
.spec.ts: kebab-case

.ts: kebab-case
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
lib/**
# NOTE: Don't modify this file. Place .prettierignore files in relevant subdirectories.

lib
pnpm-lock.yaml
27 changes: 17 additions & 10 deletions .syncpackrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"customTypes": {
"engines": {
"path": "engines",
"strategy": "versionsByName"
}
},
"dependencyTypes": [
"dev",
"engines",
"local",
"overrides",
"peer",
"pnpmOverrides",
"prod",
"resolutions"
"resolutions",
"local",
"engines"
],
"customTypes": {
"engines": {
"path": "engines",
"strategy": "versionsByName"
}
},
"semverGroups": [
{
"dependencies": ["**"],
Expand All @@ -35,5 +35,12 @@
"range": "^"
}
],
"source": ["package.json"]
"source": ["package.json", "packages/*/package.json"],
"versionGroups": [
{
"dependencies": ["$LOCAL"],
"isIgnored": true,
"packages": ["**"]
}
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ Exhibit A - Source Code Form License Notice

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
file, You can obtain one at https://mozilla.org/MPL/2.0/.

If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ outputs:
version:
description: 'suggested version'
runs:
main: 'lib/cjs/index.cjs'
main: 'lib/node/index.js'
using: 'node20'
22 changes: 22 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": [
"**/*.{test,spec}.?(c|m)[jt]s?(x)",
"**/test/**/*.?(c|m)[jt]s?(x)",
"eslint.config.mjs",
"src/**/example*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}",
"src/cli.ts!",
"src/index.ts!",
"src/types.ts",
"{scripts,perf}/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"
],
"ignore": ["**/*.d.+([a-zA-Z0-9]).ts", "**/*.d.ts", "lib/**"],
"ignoreDependencies": ["@commitlint/cli", "prettier", "syncpack", "eslint-config-escapace"],
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
},
"lefthook": {
"config": []
}
}
73 changes: 73 additions & 0 deletions lefthook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
assert_lefthook_installed: true
colors: false
source_dir: scripts/

commit-msg:
commands:
'lint commit message':
run: pnpm exec commitlint --edit {1}

pre-commit:
skip:
- merge
- rebase

commands:
knip:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 1
run: pnpm exec knip

ls-lint:
priority: 1
run: pnpm exec ls-lint --config '.ls-lint.yaml'

syncpack-fix-mismatches:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 2
run: pnpm exec syncpack fix-mismatches
stage_fixed: true

syncpack-set-semver-ranges:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 3
run: pnpm exec syncpack set-semver-ranges
stage_fixed: true

syncpack-format:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 4
run: pnpm exec syncpack format
stage_fixed: true

pnpm-install:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 5
run: pnpm install
stage_fixed: true

eslint:
exclude: '(^|/)pnpm-lock.yaml$'
glob: '*.{js,mjs,cjs,ts,mts,cts,yml,yaml,json}'
priority: 6
run: pnpm exec eslint --fix {staged_files}
stage_fixed: true

prettier:
exclude: '(^|/)pnpm-lock.yaml$'
glob: '*.{js,mjs,cjs,ts,mts,cts,yml,yaml,json,md}'
priority: 7
run: pnpm exec prettier --write {staged_files}
stage_fixed: true

typecheck:
priority: 8
run: pnpm run typecheck

test:
priority: 9
run: pnpm run test

build:
priority: 10
run: pnpm run build
2,516 changes: 0 additions & 2,516 deletions lib/cjs/index.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions lib/cjs/index.cjs.map

This file was deleted.

Loading

0 comments on commit 3bb0ebf

Please sign in to comment.