create-minimal-package 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,12 +20,12 @@ Zero-knowledge ***minimalistic*** template for creating a new npm package.
20
20
  - [New Issue Templates](https://github.com/34j/create-minimal-package/tree/main/.github/ISSUE_TEMPLATE): from [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template/tree/main/.github/ISSUE_TEMPLATE)
21
21
  - [💨GitHub Actions](https://github.com/34j/create-minimal-package/tree/main/.github/workflows) + [📊Codecov](https://about.codecov.io/): npm version of [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template/blob/main/.github/workflows/ci.yml)
22
22
  - [🧱Renovate](https://docs.renovatebot.com/): inherits [config:best-practices](https://docs.renovatebot.com/presets-config/#configbest-practices)
23
- - [⚙TypeScript](https://www.typescriptlang.org/):`tsconfig.json`,`tsconfig.build.json`(w/o tests): inherits [@tsconfig/strictest](https://www.npmjs.com/package/@tsconfig/strictest): 4 lines for `☆`, [3 lines for ES types](https://youtu.be/H91aqUHn8sE?t=148)
23
+ - [⚙TypeScript](https://www.typescriptlang.org/):`tsconfig.json`: inherits [@tsconfig/strictest](https://www.npmjs.com/package/@tsconfig/strictest): 4 lines for `☆`, [3 lines for ES types](https://youtu.be/H91aqUHn8sE?t=148)
24
24
  - ✨️Formatting
25
- - [⚠️Pre-commit](https://pre-commit.com/) and [pre-commit.ci](https://pre-commit.ci/): from [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template/tree/main/.github/ISSUE_TEMPLATE) + [mirrors-eslint](https://github.com/pre-commit/mirrors-eslint) instead of [🐶Husky](https://github.com/typicode/husky) + [Lint Staged](https://github.com/okonet/lint-staged) for better CI support
25
+ - [⚠️Pre-commit](https://pre-commit.com/) and [pre-commit.ci](https://pre-commit.ci/): from [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template/tree/main/.github/ISSUE_TEMPLATE) + [mirrors-eslint](https://github.com/pre-commit/mirrors-eslint) (⏪️[🐶Husky](https://github.com/typicode/husky) + [Lint Staged](https://github.com/okonet/lint-staged) for better CI support)
26
26
  - [ESLint](https://eslint.org/): inherits [@antfu/eslint-config](https://www.npmjs.com/package/@antfu/eslint-config)
27
27
  - ⚠️ Testing
28
- - [👢Jest](https://jestjs.io/): 2 lines for supporting Codecov and 2 lines for supporting Node.js `P`
28
+ - [⚡️Vitest](https://vitest.dev/) (⏪️[👢Jest](https://jestjs.io/)): 0 lines
29
29
  - 📖Documentation
30
30
  - [🌐GitHub Pages](https://pages.github.com/)
31
31
  - [📖TypeDoc](https://typedoc.org/): 2 lines for `☆` `P`
@@ -39,18 +39,17 @@ Zero-knowledge ***minimalistic*** template for creating a new npm package.
39
39
 
40
40
  </details>
41
41
 
42
- ## Getting started
43
-
44
- ### Set up your repository
42
+ ## Quickstart
45
43
 
46
44
  1. **Click the "Use this template" button.**
47
45
  2. Replace `FULL_NAME`, `GITHUB_USER`, and `REPO_NAME` using `sed`:
48
46
  ```bash
49
- FULL_NAME="John Smith"
50
47
  GITHUB_USER="johnsmith"
51
48
  REPO_NAME="my-cool-package"
52
- sed -i.mybak "s/\([^@]\)34j/\1$GITHUB_USER/g; s/create-minimal-package\|my-package-name/$REPO_NAME/g; s/Ryan Sonshine/$FULL_NAME/g" package.json package-lock.json src/index.ts
53
- rm *.mybak
49
+ sed -i.tmp "s/\([^@]\)34j/\1$GITHUB_USER/g; s/create-minimal-package\|my-package-name/$REPO_NAME/g; package.json package-lock.json src/index.ts
50
+ sed -i.tmp 's/"version": "[0-9.]*"/"version": "0.0.0"/' package.json
51
+ rm *.tmp
52
+ rm CHANGELOG.md
54
53
  ```
55
54
  3. Add `NPM_TOKEN` to `Settings/Secrets and variables/Actions/Repository secrets`.
56
55
  4. Add `CODECOV_TOKEN` to `Settings/Secrets and variables/Actions/Repository secrets`.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vitest_1 = require("vitest");
4
+ const src_1 = require("../src");
5
+ (0, vitest_1.describe)('index', () => {
6
+ (0, vitest_1.describe)('myPackage', () => {
7
+ (0, vitest_1.it)('should return a string containing the message', () => {
8
+ const message = 'Hello';
9
+ const result = (0, src_1.myPackage)(message);
10
+ (0, vitest_1.expect)(result).toMatch(message);
11
+ });
12
+ });
13
+ });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "create-minimal-package",
3
3
  "type": "commonjs",
4
- "version": "1.1.1",
5
- "description": "Minimalistic npm package template with 📦🚀semantic-release + Commitizen, CodeCov, Renovate, pre-commit + EsLint (✗🐶Husky + Lint Staged), 👢Jest, 📖TypeDoc + Github Pages support. Note that this is a generated sample package.",
4
+ "version": "1.2.0",
5
+ "description": "Minimalistic npm package template with 📦🚀semantic-release + Commitizen, CodeCov, Renovate, pre-commit + EsLint (✗🐶Husky + Lint Staged), ⚡️Vitest (✗👢Jest), 📖TypeDoc + Github Pages support. Note that this is a generated sample package.",
6
6
  "author": {
7
7
  "name": "34j"
8
8
  },
@@ -19,9 +19,8 @@
19
19
  "boilerplate",
20
20
  "template",
21
21
  "typescript",
22
- "vscode",
23
- "jest",
24
- "husky",
22
+ "vitest",
23
+ "pre-commit",
25
24
  "semantic-release",
26
25
  "typedoc"
27
26
  ],
@@ -33,13 +32,13 @@
33
32
  "node": ">=12.0"
34
33
  },
35
34
  "scripts": {
36
- "build:watch": "tsc --watch --project tsconfig.build.json",
37
- "build": "tsc --project tsconfig.build.json",
35
+ "build:watch": "tsc --watch --project tsconfig.json",
36
+ "build": "tsc --project tsconfig.json",
38
37
  "lint": "eslint --fix",
39
38
  "typedoc": "typedoc",
40
39
  "typedoc:watch": "typedoc --watch",
41
- "test:watch": "jest --watch",
42
- "test": "jest --coverage",
40
+ "test:watch": "vitest --watch",
41
+ "test": "vitest --coverage",
43
42
  "watch": "npm-run-all --race --parallel *:watch",
44
43
  "update": "npm-check-updates -u"
45
44
  },
@@ -48,33 +47,23 @@
48
47
  "@semantic-release/changelog": "^6.0.3",
49
48
  "@semantic-release/git": "^10.0.1",
50
49
  "@tsconfig/strictest": "^2.0.5",
51
- "@types/jest": "^29.5.14",
52
50
  "@types/node": "^22.13.10",
53
51
  "@typescript-eslint/eslint-plugin": "^8.26.1",
52
+ "@vitest/coverage-v8": "^3.0.8",
54
53
  "eslint": "^9.22.0",
55
54
  "globals": "^16.0.0",
56
- "jest": "^29.7.0",
57
55
  "npm-check-updates": "^17.1.15",
58
56
  "npm-run-all2": "5.0.0",
59
57
  "semantic-release": "^24.2.3",
60
- "ts-jest": "^29.2.6",
61
58
  "typedoc": "^0.27.9",
62
- "typescript": "^5.8.2"
63
- },
64
- "jest": {
65
- "preset": "ts-jest",
66
- "testEnvironment": "node",
67
- "collectCoverage": true,
68
- "collectCoverageFrom": [
69
- "src/**/*.ts",
70
- "!src/**/*.d.ts"
71
- ]
59
+ "typescript": "^5.8.2",
60
+ "vitest": "^3.0.8"
72
61
  },
73
62
  "typedocOptions": {
74
63
  "entryPoints": [
75
64
  "./src"
76
65
  ],
77
- "tsconfig": "./tsconfig.build.json"
66
+ "tsconfig": "./tsconfig.json"
78
67
  },
79
68
  "release": {
80
69
  "plugins": [
File without changes