Skip to content

Commit 6b68190

Browse files
committed
0.1.0
1 parent 7641162 commit 6b68190

18 files changed

+1426
-3495
lines changed

.babelrc

-3
This file was deleted.

.eslintrc.js

-35
This file was deleted.

.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
dist/
2-
tmp/
31
node_modules/
4-
publish.sh
2+
.build
3+
.DS_Store

.prettierrc.js

-7
This file was deleted.

build.config.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineBuildConfig } from 'unbuild';
2+
3+
export default defineBuildConfig({
4+
entries: [{
5+
input: './exports/main.ts',
6+
name: 'main',
7+
}],
8+
outDir: '.build',
9+
rollup: {
10+
emitCJS: true,
11+
inlineDependencies: true,
12+
},
13+
declaration: true,
14+
});

dprint.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "https://raw.githubusercontent.com/Tunnel-Labs/dprint-config/main/dprint.jsonc"
3+
}

dprint.jsonc

-88
This file was deleted.

src/index.ts renamed to exports/main.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export {
44
fromSafePromise,
55
okAsync,
66
ResultAsync,
7-
} from './result-async.js';
8-
export { $try, Err, err, fromThrowable, Ok, ok, Result } from './result.js';
7+
} from '#utils/result-async.ts';
8+
export { $try, Err, err, fromThrowable, Ok, ok, Result } from '#utils/result.ts';
99

10-
import type { Err, Ok } from './result.js';
10+
import type { Err, Ok } from '#utils/result.ts';
1111
export type TryOk<T> = (value: T) => Ok<T, never>;
1212
export type TryErr<E> = (error: E) => Err<never, E>;

package.json

+18-27
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
{
22
"name": "errok",
33
"type": "module",
4-
"version": "0.0.3",
4+
"version": "0.1.0",
55
"description": "Type-safe error handling",
6+
"main": "./.build/main.cjs",
7+
"module": "./.build/main.mjs",
8+
"types": "./.build/main.d.ts",
69
"exports": {
710
"require": {
8-
"types": "./dist/index.d.cts",
9-
"default": "./dist/index.cjs"
11+
"types": "./.build/main.d.cts",
12+
"default": "./.build/main.cjs"
1013
},
1114
"import": {
12-
"types": "./dist/index.d.mts",
13-
"default": "./dist/index.mjs"
15+
"types": "./.build/main.d.mts",
16+
"default": "./.build/main.mjs"
1417
}
1518
},
16-
"files": [
17-
"dist"
18-
],
19+
"imports": {
20+
"#utils/*": "./utils/*",
21+
"#types": "./types/_.ts"
22+
},
23+
"files": [".build"],
1924
"scripts": {
20-
"test": "jest && npm run test-types",
21-
"test-types": "tsc --noEmit -p ./tests/tsconfig.tests.json",
22-
"lint": "eslint ./src --ext .ts",
2325
"format": "dprint fmt",
2426
"typecheck": "tsc --noEmit",
25-
"clean": "rm -rf ./dist ./tmp",
26-
"build": "pkgroll"
27+
"clean": "rm -rf ./.build",
28+
"build": "unbuild"
2729
},
2830
"repository": {
2931
"type": "git",
@@ -35,29 +37,18 @@
3537
},
3638
"homepage": "https://github.com/Tunnel-Labs/errok#readme",
3739
"devDependencies": {
38-
"@babel/core": "7.23.7",
39-
"@babel/preset-env": "7.23.8",
40-
"@babel/preset-typescript": "7.23.3",
40+
"@tunnel/tsconfig": "^0.0.0",
4141
"@types/jest": "29.5.11",
4242
"@types/node": "20.11.0",
4343
"@typescript-eslint/eslint-plugin": "6.18.1",
4444
"@typescript-eslint/parser": "6.18.1",
45-
"babel-jest": "29.7.0",
4645
"dprint": "0.45.0",
4746
"eslint": "8.56.0",
4847
"eslint-config-prettier": "9.1.0",
4948
"eslint-plugin-prettier": "5.1.3",
50-
"jest": "29.7.0",
51-
"pkgroll": "2.0.1",
52-
"prettier": "3.1.1",
53-
"rollup": "4.9.4",
54-
"rollup-plugin-dts": "6.1.0",
55-
"rollup-plugin-typescript2": "^0.36.0",
56-
"testdouble": "3.20.1",
57-
"ts-jest": "29.1.1",
58-
"ts-toolbelt": "9.6.0",
5949
"tslib": "^2.6.2",
60-
"typescript": "5.3.3"
50+
"typescript": "^5.4.5",
51+
"unbuild": "^2.0.0"
6152
},
6253
"keywords": [
6354
"typescript",

0 commit comments

Comments
 (0)