Skip to content

Commit fbf4745

Browse files
committed
update yarn
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent d5bb15d commit fbf4745

File tree

7 files changed

+31075
-22720
lines changed

7 files changed

+31075
-22720
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package-lock.json
77
.env
88
.env.local
99
.npmrc
10+
.yarn
1011

1112
# output directory
1213
build

.yarnrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
yarn-path ".yarn/releases/yarn-1.22.17.cjs"

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.1.1.cjs

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"test-compile": "tsc -watch -p ./"
3838
},
3939
"dependencies": {
40+
"@types/vscode": "^1.63.1",
4041
"chokidar": "3.5.2",
4142
"dotenv": "^8.2.0",
4243
"eslint": "7.32.0",
@@ -68,7 +69,6 @@
6869
"eslint-plugin-react": "7.27.1",
6970
"eslint-plugin-react-hooks": "^4.3.0",
7071
"prettier": "2.5.0",
71-
"vscode": "^1.1.37",
7272
"vscode-test": "^1.6.1"
7373
},
7474
"engines": {
@@ -104,5 +104,6 @@
104104
},
105105
"preview": true,
106106
"publisher": "CodeRoad",
107-
"icon": "coderoad_icon.png"
107+
"icon": "coderoad_icon.png",
108+
"packageManager": "yarn@3.1.1"
108109
}

src/services/storage/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ class Storage<T> {
3737
if (!sessionFile) {
3838
throw new Error('No session file found')
3939
}
40-
const data: T = JSON.parse(sessionFile)
40+
const valueFromFile: T = JSON.parse(sessionFile)
4141

42-
if (data) {
42+
if (valueFromFile) {
4343
// validate session
44-
const keys = Object.keys(data)
44+
const keys = Object.keys(valueFromFile)
4545
if (keys.length) {
46-
return data
46+
return valueFromFile
4747
}
4848
}
4949
} catch (err) {
@@ -54,7 +54,8 @@ class Storage<T> {
5454
if (value) {
5555
// 2. read from local storage
5656
try {
57-
return JSON.parse(value)
57+
const valueFromLocalStorage = JSON.parse(value)
58+
return valueFromLocalStorage
5859
} catch (err) {
5960
console.warn(`Failed to parse session state from local storage: ${value}`)
6061
}

0 commit comments

Comments
 (0)