Skip to content

Commit ec74cf2

Browse files
authoredMar 25, 2021
Merge pull request #339 from LeetCode-OpenSource/fix/many-issues
fix: higher deps version issues
2 parents d888cdb + aa1f697 commit ec74cf2

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed
 

‎.github/workflows/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
with:
2929
node-version: 14
3030
- run: npm install
31+
- run: npm install yarn -g
32+
- run: yarn lint
3133
- run: npm run build
3234
- id: publish
3335
uses: JS-DevTools/npm-publish@v1

‎package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"scripts": {
1919
"build": "rm -rf ./dist && tsc -p ./tsconfig.json",
2020
"lint": "yarn lint:eslint && yarn lint:tsc",
21+
"lint:tsc": "tsc -p ./tsconfig.json --noEmit",
2122
"lint:eslint": "eslint . --ext .ts,.tsx --fix --max-warnings 0"
2223
},
2324
"keywords": [
@@ -58,15 +59,15 @@
5859
},
5960
"dependencies": {
6061
"chalk": "^4.0.0",
61-
"commander": "^7.0.0",
62+
"commander": "^6.0.0",
6263
"glob": "^7.1.3",
6364
"js-yaml": "^4.0.0",
6465
"lodash": "^4.17.11",
6566
"log-update": "^4.0.0",
6667
"outdent": "^0.8.0",
67-
"path-to-regexp": "^6.1.0",
68+
"path-to-regexp": "^3.0.0",
6869
"prettier": "^2.0.1",
6970
"qs": "^6.6.0",
70-
"tslib": "^2.0.0"
71+
"tslib": "^2.1.0"
7172
}
7273
}

‎src/cli/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as fs from 'fs'
22
import * as path from 'path'
3-
import * as program from 'commander'
4-
import * as glob from 'glob'
3+
import program from 'commander'
4+
import glob from 'glob'
55
import outdent from 'outdent'
66
import chalk from 'chalk'
77
import { format, resolveConfig } from 'prettier'

‎src/cli/utils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { merge } from 'lodash'
2-
import { safeLoad } from 'js-yaml'
3-
import * as pathToRegexp from 'path-to-regexp'
2+
import { load } from 'js-yaml'
3+
import pathToRegexp from 'path-to-regexp'
44

55
import { ParamsType } from '../path-utils'
66
import { Options, YAML } from './types'
@@ -43,7 +43,7 @@ export function codeStringify(code: Record<string, unknown>): string {
4343
}
4444

4545
export function loadYAML(yaml: string): YAML {
46-
const { paths = {}, options = {} } = safeLoad(yaml)
46+
const { paths = {}, options = {} } = load(yaml) as any
4747

4848
return {
4949
paths,

‎tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"noImplicitAny": true,
1212
"strict": true,
1313
"noImplicitReturns": true,
14+
"esModuleInterop": true,
1415
"moduleResolution": "node",
1516
"lib": ["dom", "es2015"],
1617
"target": "es5",

‎yarn.lock

+5-10
Original file line numberDiff line numberDiff line change
@@ -369,16 +369,11 @@ color-name@~1.1.4:
369369
resolved "https://npm.lingkou.xyz/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
370370
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
371371

372-
commander@^6.2.0:
372+
commander@^6.0.0, commander@^6.2.0:
373373
version "6.2.1"
374374
resolved "https://npm.lingkou.xyz/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
375375
integrity sha1-B5LraC37wyWZm7K4T93duhEKxzw=
376376

377-
commander@^7.0.0:
378-
version "7.2.0"
379-
resolved "https://npm.lingkou.xyz/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
380-
integrity sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc=
381-
382377
concat-map@0.0.1:
383378
version "0.0.1"
384379
resolved "https://npm.lingkou.xyz/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -1112,10 +1107,10 @@ path-key@^3.0.0, path-key@^3.1.0:
11121107
resolved "https://npm.lingkou.xyz/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
11131108
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
11141109

1115-
path-to-regexp@^6.1.0:
1116-
version "6.2.0"
1117-
resolved "https://npm.lingkou.xyz/path-to-regexp/-/path-to-regexp-6.2.0.tgz#f7b3803336104c346889adece614669230645f38"
1118-
integrity sha1-97OAMzYQTDRoia3s5hRmkjBkXzg=
1110+
path-to-regexp@^3.0.0:
1111+
version "3.2.0"
1112+
resolved "https://npm.lingkou.xyz/path-to-regexp/-/path-to-regexp-3.2.0.tgz#fa7877ecbc495c601907562222453c43cc204a5f"
1113+
integrity sha1-+nh37LxJXGAZB1YiIkU8Q8wgSl8=
11191114

11201115
path-type@^4.0.0:
11211116
version "4.0.0"

0 commit comments

Comments
 (0)