diff --git a/.husky/commit-msg b/.husky/commit-msg index 4002db7..185c4dd 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -2,3 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" npx --no -- commitlint --edit +npx --no -- commitlint --edit diff --git a/bin/test.ts b/bin/test.ts index 66ed4b7..cbbc9e9 100644 --- a/bin/test.ts +++ b/bin/test.ts @@ -20,7 +20,7 @@ import { processCliArgs, configure, run } from '@japa/runner' configure({ ...processCliArgs(process.argv.slice(2)), ...{ - files: ['test/**/*.spec.ts'], + files: ['tests/**/*.spec.ts'], plugins: [assert(), runFailedTests()], reporters: [specReporter()], importer: (filePath) => { diff --git a/package.json b/package.json index a39be21..717702d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "scripts": { "pretest": "npm run lint", - "test": "c8 npm run vscode:test", + "test": "c8 npm run quick:test", "clean": "del build", "compile": "npm run lint && npm run clean && tsc", "build": "npm run compile", @@ -28,7 +28,7 @@ "format": "prettier --write .", "release": "np", "version": "npm run build", - "vscode:test": "node --loader=ts-node/esm bin/test.js", + "quick:test": "node --loader=ts-node/esm bin/test.ts", "sync-labels": "github-label-sync --labels .github/labels.json dimerapp/markdown" }, "repository": { @@ -48,45 +48,27 @@ }, "homepage": "https://github.com/dimerapp/markdown#readme", "devDependencies": { - "@adonisjs/mrm-preset": "^3.0.0", - "@adonisjs/require-ts": "^2.0.3", - "@types/node": "^14.14.37", - "commitizen": "^4.2.3", - "cz-conventional-changelog": "^3.3.0", - "del-cli": "^3.0.1", - "doctoc": "^2.0.0", - "eslint": "^7.23.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-adonis": "^1.3.0", - "eslint-plugin-prettier": "^3.3.1", + "@commitlint/cli": "^17.6.1", + "@commitlint/config-conventional": "^17.6.1", + "@japa/assert": "^1.4.1", + "@japa/run-failed-tests": "^1.1.1", + "@japa/runner": "^2.5.1", + "@japa/spec-reporter": "^1.3.3", + "@swc/core": "^1.3.51", + "@types/node": "^18.15.11", + "c8": "^7.13.0", + "del-cli": "^5.0.0", + "eslint": "^8.38.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-adonis": "^3.0.3", + "eslint-plugin-prettier": "^4.2.1", "github-label-sync": "^2.0.0", - "husky": "^5.2.0", - "japa": "^3.1.1", - "mrm": "^2.6.1", - "np": "^7.4.0", - "npm-audit-html": "^1.5.0", - "prettier": "^2.2.1", - "ts-dedent": "^2.1.0", - "typescript": "^4.2.3" - }, - "husky": { - "hooks": { - "pre-commit": "npm audit --production --json | ./node_modules/.bin/npm-audit-html && git add npm-audit.html && doctoc README.md --title='## Table of contents' && git add README.md", - "commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js" - } - }, - "nyc": { - "exclude": [ - "test" - ], - "extension": [ - ".ts" - ] - }, - "config": { - "commitizen": { - "path": "cz-conventional-changelog" - } + "husky": "^8.0.3", + "np": "^7.7.0", + "prettier": "^2.8.7", + "ts-dedent": "^2.2.0", + "ts-node": "^10.9.1", + "typescript": "^5.0.4" }, "dependencies": { "front-matter": "^4.0.2", diff --git a/test/codeblock_parser.spec.ts b/tests/codeblock_parser.spec.ts similarity index 100% rename from test/codeblock_parser.spec.ts rename to tests/codeblock_parser.spec.ts diff --git a/test/codegroup.spec.ts b/tests/codegroup.spec.ts similarity index 100% rename from test/codegroup.spec.ts rename to tests/codegroup.spec.ts diff --git a/test/codesandbox.spec.ts b/tests/codesandbox.spec.ts similarity index 100% rename from test/codesandbox.spec.ts rename to tests/codesandbox.spec.ts diff --git a/test/markdown_file.spec.ts b/tests/markdown_file.spec.ts similarity index 100% rename from test/markdown_file.spec.ts rename to tests/markdown_file.spec.ts diff --git a/test/note.spec.ts b/tests/note.spec.ts similarity index 100% rename from test/note.spec.ts rename to tests/note.spec.ts diff --git a/test/tip.spec.ts b/tests/tip.spec.ts similarity index 100% rename from test/tip.spec.ts rename to tests/tip.spec.ts diff --git a/test/video.spec.ts b/tests/video.spec.ts similarity index 100% rename from test/video.spec.ts rename to tests/video.spec.ts diff --git a/test/warning.spec.ts b/tests/warning.spec.ts similarity index 100% rename from test/warning.spec.ts rename to tests/warning.spec.ts diff --git a/test/youtube.spec.ts b/tests/youtube.spec.ts similarity index 100% rename from test/youtube.spec.ts rename to tests/youtube.spec.ts