-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update dependencies & switch to vitest
- Loading branch information
1 parent
40b1be3
commit eb6853e
Showing
38 changed files
with
7,909 additions
and
5,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2022, | ||
"sourceType": "module" | ||
}, | ||
"ignorePatterns": ["node_modules", "build", "coverage"], | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"prettier", | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"rules": { | ||
"no-var": "error", | ||
"no-multi-spaces": "error", | ||
"space-in-parens": "error", | ||
"no-multiple-empty-lines": "error", | ||
"no-constant-condition": ["error", { "checkLoops": false }], | ||
"prefer-const": "error", | ||
"max-lines-per-function": ["warn", 80], | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-unsafe-declaration-merging": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"prettier/prettier": [ | ||
"warn", | ||
{ | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
dist/ | ||
node_modules/ | ||
# yarn cache | ||
.yarn/* | ||
.yarn/cache | ||
!.yarn/patches | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
|
||
coverage/ | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
yarn commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
command_exists () { | ||
command -v "$1" >/dev/null 2>&1 | ||
} | ||
|
||
# Workaround for Windows 10, Git Bash and Yarn | ||
if command_exists winpty && test -t 1; then | ||
exec < /dev/tty | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
yarn lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn test:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
exec < /dev/tty && yarn cz --hook || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"embeddedLanguageFormatting": "auto", | ||
"htmlWhitespaceSensitivity": "css", | ||
"insertPragma": false, | ||
"jsxSingleQuote": true, | ||
"printWidth": 80, | ||
"proseWrap": "always", | ||
"quoteProps": "as-needed", | ||
"requirePragma": false, | ||
"useTabs": false, | ||
"vueIndentScriptAndStyle": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-3.6.1.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
// Run type-check on changes to TypeScript files | ||
'**/*.ts?(x)': () => 'yarn type-check', | ||
// Run ESLint on changes to JavaScript/TypeScript files | ||
'**/*.(ts|js)?(x)': filenames => `yarn lint ${filenames.join(' ')}`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,57 @@ | ||
{ | ||
"name": "typescript-algorithms", | ||
"name": "typescript-data-structures-algorithms", | ||
"version": "1.0.0", | ||
"description": "Algorithms and data structures implemented in TypeScript", | ||
"main": "dist/index.js", | ||
"repository": "https://github.com/francislagares/typescript-algorithms.git", | ||
"repository": "https://github.com/francislagares/typescript-data-structures-algorithms.git", | ||
"author": "Francis Lagares", | ||
"license": "MIT", | ||
"scripts": { | ||
"prepare": "husky install", | ||
"build-ts": "tsc", | ||
"build-dev": "tsc --watch", | ||
"start": "nodemon dist/index.js", | ||
"dev": "concurrently \"yarn:build-dev\" \"yarn:start\"", | ||
"test-dev": "jest --watchAll --no-cache", | ||
"test": "jest --verbose" | ||
"test:ci": "vitest run", | ||
"test:watch": "vitest watch --ui", | ||
"test:coverage": "vitest run --coverage", | ||
"test:report": "npx vite preview --outDir ./coverage", | ||
"type-check": "tsc --project tsconfig.json --pretty --noEmit", | ||
"lint": "eslint --ext js,jsx,ts,tsx --fix --ignore-path .gitignore .", | ||
"format": "prettier --ignore-path .gitignore \"src/**/*.+(ts|js|tsx|json|md)\" --write" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.7.1", | ||
"@commitlint/config-conventional": "^17.7.0", | ||
"@typescript-eslint/eslint-plugin": "^6.3.0", | ||
"@typescript-eslint/parser": "^6.3.0", | ||
"@vitest/coverage-v8": "^0.34.1", | ||
"@vitest/ui": "^0.34.1", | ||
"commitizen": "^4.3.0", | ||
"concurrently": "^8.2.0", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"eslint": "^8.46.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.2.3", | ||
"nodemon": "^3.0.1", | ||
"prettier": "^3.0.1", | ||
"typescript": "^5.1.6", | ||
"vite-tsconfig-paths": "^4.2.0", | ||
"vitest": "^0.34.1", | ||
"vitest-mock-extended": "^1.2.0" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@types/jest": "^26.0.15", | ||
"concurrently": "^5.3.0", | ||
"husky": "^4.3.0", | ||
"jest": "^26.6.3", | ||
"nodemon": "^2.0.6", | ||
"ts-jest": "^26.4.4", | ||
"typescript": "^4.1.2" | ||
} | ||
"engines": { | ||
"node": ">=20.0.0", | ||
"npm": ">=9.6.5" | ||
}, | ||
"packageManager": "yarn@3.6.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": ["config:base"], | ||
"semanticCommits": true, | ||
"stabilityDays": 3, | ||
"prCreation": "not-pending", | ||
"labels": ["type: dependencies"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { describe, expect, test } from 'vitest'; | ||
|
||
import Graph from '../Graph'; | ||
|
||
describe('Graphs', () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.