Skip to content

Commit

Permalink
feat: initial release (#4)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
ivanhofer and github-actions[bot] authored Oct 17, 2022
1 parent 3f66c5c commit fee154b
Show file tree
Hide file tree
Showing 29 changed files with 1,375 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-timers-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"exceptionally": patch
---

minor fix
2 changes: 1 addition & 1 deletion .dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"**/*"
],
"excludes": [
"out"
"lib"
]
}
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
out
lib
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const config = {
camelcase: 'off',
'no-redeclare': 'off',
'no-undef': 'off',
'comma-dangle': 'off',

// modify defaults
'no-multi-spaces': 'warn',
Expand All @@ -43,7 +44,6 @@ const config = {
'no-mixed-spaces-and-tabs': 'warn',
'object-shorthand': 'warn',
'space-in-parens': 'warn',
'comma-dangle': 'warn',
'key-spacing': 'warn',
'padded-blocks': 'warn',

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
- name: check PR title
uses: deepakputhraya/action-pr-title@master
with:
regex: '^(chore|fix)|(#\d+): '
regex: '^(chore|fix|feat|Version Packages)|(#\d+): '
prefix_case_sensitive: true
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ jobs:
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "check output size"

on:
pull_request:
branches:
- main

jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- name: checkout repository
uses: actions/checkout@v2

- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7.13.4

- name: check sizes
uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
out
lib
.eslintcache
18 changes: 18 additions & 0 deletions .size-limit.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// @ts-check

const config = [
{
path: 'lib/index.js',
limit: '205 b',
},
{
path: 'lib/index.cjs',
limit: '304 b',
},
{
path: 'lib/index.global.js',
limit: '284 b',
},
]

module.exports = config
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"dprint.dprint",
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"ZixuanChen.vitest-explorer"
]
}
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Current vitest Test File",
"request": "launch",
"type": "node",
"args": [
"watch",
"${relativeFile}"
],
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"skipFiles": [
"<node_internals>/**",
"**/node_modules/**"
],
"autoAttachChildProcesses": true,
"smartStep": true,
"console": "integratedTerminal"
}
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"editor.wordWrapColumn": 120,
"editor.wordWrap": "bounded",
"search.exclude": {
"**/out": true
"**/lib": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# exceptionally

## 0.1.0

### Minor Changes

- 6e41f9f: implement basics
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# exceptionally
# :shield: exceptionally

**A fully type-safe and lightweight way of using exceptions instead of throwing errors**
43 changes: 33 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
"name": "exceptionally",
"version": "0.0.0",
"version": "0.1.0",
"description": "A fully type-safe and lightweight way of using exceptions instead of throwing errors",
"scripts": {
"---- DEV -----------------------------------------------------------------------------": "",
"dev": "echo hi",
"dev": "tsup --watch",
"---- BUILD ---------------------------------------------------------------------------": "",
"build": "tsc",
"release": "pnpm build && changeset publish",
"build": "tsup",
"release": "pnpm build && npm publish",
"---- TEST ----------------------------------------------------------------------------": "",
"test": "tsc --noEmit",
"test": "pnpm tsc && pnpm vitest",
"vitest": "vitest run",
"vitest:watch": "vitest watch",
"tsc": "tsc --noEmit",
"tsc:watch": "tsc --noEmit --watch",
"size": "size-limit",
"---- LINT ----------------------------------------------------------------------------": "",
"lint": "pnpm format && pnpm eslint",
"lint:fix": "pnpm format:fix && pnpm eslint:fix",
Expand All @@ -23,12 +28,11 @@
"prepare": "husky install",
"---- SHORTCUTS -----------------------------------------------------------------------": "",
"changeset": "changeset",
"changeset:apply": "changeset version",
"lint-staged": "lint-staged"
},
"dependencies": {},
"devDependencies": {
"@changesets/cli": "^2.25.0",
"@size-limit/preset-small-lib": "^8.1.0",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"dprint": "^0.32.1",
Expand All @@ -37,11 +41,30 @@
"eslint-config-xo-typescript": "^0.53.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"typescript": "^4.8.4"
"size-limit": "^8.1.0",
"tsup": "^6.2.3",
"typescript": "^4.8.4",
"vite": "^3.1.8",
"vitest": "^0.24.1"
},
"type": "module",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"browser": "./lib/index.global.js",
"types": "./lib/index.d.ts",
"exports": {
".": "./lib"
},
"files": [
"/lib"
],
"author": "ivanhofer",
"keywords": [],
"keywords": [
"exceptions",
"errors",
"typesafe",
"lightweight"
],
"license": "MIT",
"homepage": "https://github.com/ivanhofer/exceptionally#readme",
"repository": {
Expand All @@ -52,4 +75,4 @@
"type": "github",
"url": "https://github.com/sponsors/ivanhofer"
}
}
}
Loading

0 comments on commit fee154b

Please sign in to comment.