@gjuchault/typescript-library-starter
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -12,7 +12,10 @@ { | ||
"plugins": ["import", "@typescript-eslint"], | ||
"ignorePatterns": ["scripts/*", "ava.config.mjs", "esbuild-hook.js"], | ||
"ignorePatterns": ["scripts/*", "esbuild-hook.js"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:eslint-comments/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:@typescript-eslint/strict", | ||
"plugin:import/recommended", | ||
@@ -38,4 +41,7 @@ "plugin:import/typescript", | ||
} | ||
] | ||
], | ||
"import/no-extraneous-dependencies": "error", | ||
"import/no-mutable-exports": "error", | ||
"import/no-unused-modules": "error" | ||
} | ||
} |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
@@ -2,0 +3,0 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
@@ -1,2 +0,2 @@ | ||
## [2.0.2](https://github.com/gjuchault/typescript-library-starter/compare/v2.0.1...v2.0.2) (2022-06-06) | ||
## [2.0.3](https://github.com/gjuchault/typescript-library-starter/compare/v2.0.2...v2.0.3) (2022-08-05) | ||
@@ -6,2 +6,2 @@ | ||
* audit ([32e90ac](https://github.com/gjuchault/typescript-library-starter/commit/32e90ac2be80ab3270e5e1525d21b2a283de41af)) | ||
* **ts:** update rootDir & types target ([4ad82cd](https://github.com/gjuchault/typescript-library-starter/commit/4ad82cd661a1f744c1c71cd15aef454f6dc06a1a)) |
{ | ||
"name": "@gjuchault/typescript-library-starter", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Yet another typescript library starter template", | ||
@@ -17,3 +17,3 @@ "keywords": [ | ||
"module": "./build/esm/index.js", | ||
"types": "./build/index.d.ts", | ||
"types": "./build/src/index.d.ts", | ||
"license": "MIT", | ||
@@ -37,4 +37,5 @@ "engines": { | ||
"lint:check": "eslint src --ext .ts", | ||
"test": "ava", | ||
"test:coverage": "nyc ava && nyc report --reporter=html", | ||
"test": "vitest run", | ||
"test:watch": "vitest watch", | ||
"test:coverage": "vitest run --coverage", | ||
"test:setup": "node -r ./esbuild-hook ./scripts/testSetup", | ||
@@ -46,28 +47,29 @@ "spell:check": "cspell \"{README.md,CODE_OF_CONDUCT.md,CONTRIBUTING.md,.github/*.md,src/**/*.ts}\"", | ||
"devDependencies": { | ||
"@ryansonshine/commitizen": "^4.2.8", | ||
"@ryansonshine/cz-conventional-changelog": "^3.3.4", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/commit-analyzer": "^9.0.2", | ||
"@semantic-release/github": "^8.0.4", | ||
"@semantic-release/github": "^8.0.5", | ||
"@semantic-release/npm": "^9.0.1", | ||
"@semantic-release/release-notes-generator": "^10.0.3", | ||
"@types/node": "^17.0.40", | ||
"@types/node": "^18.6.4", | ||
"@types/prompts": "^2.0.14", | ||
"@typescript-eslint/eslint-plugin": "^5.27.0", | ||
"@typescript-eslint/parser": "^5.27.0", | ||
"ava": "^4.3.0", | ||
"@ryansonshine/commitizen": "^4.2.8", | ||
"cspell": "^6.1.1", | ||
"@ryansonshine/cz-conventional-changelog": "^3.3.4", | ||
"esbuild": "^0.14.42", | ||
"eslint": "^8.17.0", | ||
"@typescript-eslint/eslint-plugin": "^5.32.0", | ||
"@typescript-eslint/parser": "^5.32.0", | ||
"c8": "^7.12.0", | ||
"cspell": "^6.5.0", | ||
"esbuild": "^0.14.53", | ||
"eslint": "^8.21.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-import-resolver-typescript": "^2.7.1", | ||
"eslint-import-resolver-typescript": "^3.4.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.6.2", | ||
"prettier": "^2.7.1", | ||
"prompts": "^2.4.2", | ||
"semantic-release": "^19.0.2", | ||
"semantic-release": "^19.0.3", | ||
"slugify": "^1.6.5", | ||
"source-map-support": "^0.5.21", | ||
"typescript": "^4.7.3" | ||
"typescript": "^4.7.4", | ||
"vitest": "^0.20.3" | ||
}, | ||
@@ -74,0 +76,0 @@ "volta": { |
@@ -50,8 +50,9 @@ # Typescript Library Starter | ||
typescript-library-starter uses [ava](https://github.com/avajs/ava) and [esbuild-register](https://github.com/egoist/esbuild-register) so that there is no need to compile before the tests start running. The coverage is done through [nyc](https://github.com/istanbuljs/nyc). | ||
typescript-library-starter uses [vitest](https://vitest.dev/). The coverage is done through vitest, using [c8](https://github.com/bcoe/c8). | ||
Commands: | ||
- `test`: runs ava test runner | ||
- `test:coverage`: runs ava test runner and generates coverage reports | ||
- `test`: runs vitest test runner | ||
- `test:watch`: runs vitest test runner in watch mode | ||
- `test:coverage`: runs vitest test runner and generates coverage reports | ||
@@ -58,0 +59,0 @@ ### Format & lint |
@@ -59,3 +59,3 @@ import childProcess from "child_process"; | ||
} catch (err) { | ||
if (err.stderr === "") { | ||
if ((err as unknown as Record<string, string>).stderr === "") { | ||
return; | ||
@@ -62,0 +62,0 @@ } |
@@ -1,10 +0,28 @@ | ||
import test from "ava"; | ||
import { describe, expect, it } from "vitest"; | ||
import { foo, bar } from "../index"; | ||
test("foo()", (t) => { | ||
t.is(foo(1, 2), 3); | ||
describe("foo()", () => { | ||
describe("given two positive integers", () => { | ||
const first = 1; | ||
const second = 2; | ||
describe("when called", () => { | ||
it("returns the sum of them", () => { | ||
expect(foo(first, second)).toEqual(3); | ||
}); | ||
}); | ||
}); | ||
}); | ||
test("bar()", (t) => { | ||
t.is(bar(2, 1), 1); | ||
describe("bar()", () => { | ||
describe("given two positive integers", () => { | ||
const first = 2; | ||
const second = 1; | ||
describe("when called", () => { | ||
it("returns the subtraction of them", () => { | ||
expect(bar(first, second)).toEqual(1); | ||
}); | ||
}); | ||
}); | ||
}); |
@@ -9,3 +9,3 @@ { | ||
"rootDir": "./src", | ||
"rootDir": "./", | ||
"outDir": "build", | ||
@@ -18,4 +18,5 @@ | ||
"forceConsistentCasingInFileNames": true, | ||
"declaration": true | ||
"declaration": true, | ||
"resolveJsonModule": true | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
31661
567
81
27