Skip to content

Commit

Permalink
Fix yarn issues, mention yarn version
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperAuguste committed Apr 25, 2023
1 parent b238c58 commit c597163
Show file tree
Hide file tree
Showing 5 changed files with 2,980 additions and 4,792 deletions.
2 changes: 2 additions & 0 deletions Development.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Developing scip-typescript

Please note that the yarn version used by CI is `v1.22.19` - you should use this version as well to prevent lockfile conflicts.

## References

- VS Code is a good reference point for the "correct" behavior
Expand Down
4 changes: 2 additions & 2 deletions snapshots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"input/*"
],
"dependencies": {
"@sourcegraph/tsconfig": "4.0.1",
"react": "18.0.0"
"react": "18.0.0",
"@sourcegraph/tsconfig": "4.0.1"
},
"devDependencies": {
"@types/react": "17.0.52"
Expand Down
165 changes: 43 additions & 122 deletions snapshots/yarn.lock
Original file line number Diff line number Diff line change
@@ -1,130 +1,51 @@
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

__metadata:
version: 6
cacheKey: 8

"@example/a@workspace:input/multi-project/packages/a":
version: 0.0.0-use.local
resolution: "@example/a@workspace:input/multi-project/packages/a"
languageName: unknown
linkType: soft
"@sourcegraph/[email protected]":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@sourcegraph/tsconfig/-/tsconfig-4.0.1.tgz#5965ec41771d2ac5b23b6e0d919cee3e70485840"
integrity sha512-G/xsejsR84G5dj3kHJ7svKBo9E5tWl96rUHKP94Y2UDtA7BzUhAYbieM+b9ZUpIRt66h3+MlYbG5HK4UI2zDzw==

"@example/b@workspace:input/multi-project/packages/b":
version: 0.0.0-use.local
resolution: "@example/b@workspace:input/multi-project/packages/b"
languageName: unknown
linkType: soft
"@types/prop-types@*":
version "15.7.4"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11"
integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==

"@sourcegraph/tsconfig@npm:4.0.1":
version: 4.0.1
resolution: "@sourcegraph/tsconfig@npm:4.0.1"
checksum: cd552b47dcf27b59e944dee20ff29e8f96b77c956bc96c7db44910217fb1c978ff410add86c92ff242274f91484b59b27be4980aea25c77fd922b3c5e31f5d05
languageName: node
linkType: hard

"@types/prop-types@npm:*":
version: 15.7.4
resolution: "@types/prop-types@npm:15.7.4"
checksum: ef6e1899e59b876c273811b1bd845022fc66d5a3d11cb38a25b6c566b30514ae38fe20a40f67622f362a4f4f7f9224e22d8da101cff3d6e97e11d7b4c307cfc1
languageName: node
linkType: hard

"@types/react@npm:17.0.52":
version: 17.0.52
resolution: "@types/react@npm:17.0.52"
dependencies:
"@types/prop-types": "*"
"@types/scheduler": "*"
csstype: ^3.0.2
checksum: a51b98dd87838d161278fdf9dd78e6a4ff8c018f406d6647f77963e144fb52a8beee40c89fd0e7e840eaeaa8bd9fe2f34519410540b1a52d43a6f8b4d2fbce33
languageName: node
linkType: hard

"@types/scheduler@npm:*":
version: 0.16.2
resolution: "@types/scheduler@npm:0.16.2"
checksum: b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc
languageName: node
linkType: hard

"csstype@npm:^3.0.2":
version: 3.0.11
resolution: "csstype@npm:3.0.11"
checksum: 95e56abfe9ca219ae065acb4e43f61771a03170eed919127f558dfa168240867aba7629c8d98a201a0dd06d9a5ce82686f0570031c928516c61816adbc7c877f
languageName: node
linkType: hard

"invalid-package-json@workspace:input/invalid-package-json":
version: 0.0.0-use.local
resolution: "invalid-package-json@workspace:input/invalid-package-json"
languageName: unknown
linkType: soft

"js-tokens@npm:^3.0.0 || ^4.0.0":
version: 4.0.0
resolution: "js-tokens@npm:4.0.0"
checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78
languageName: node
linkType: hard

"loose-envify@npm:^1.1.0":
version: 1.4.0
resolution: "loose-envify@npm:1.4.0"
"@types/[email protected]":
version "17.0.52"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.52.tgz#10d8b907b5c563ac014a541f289ae8eaa9bf2e9b"
integrity sha512-vwk8QqVODi0VaZZpDXQCmEmiOuyjEFPY7Ttaw5vjM112LOq37yz1CDJGrRJwA1fYEq4Iitd5rnjd1yWAc/bT+A==
dependencies:
js-tokens: ^3.0.0 || ^4.0.0
bin:
loose-envify: cli.js
checksum: 6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4
languageName: node
linkType: hard

"multi-project@workspace:input/multi-project":
version: 0.0.0-use.local
resolution: "multi-project@workspace:input/multi-project"
languageName: unknown
linkType: soft

"pnpm-workspaces@workspace:input/pnpm-workspaces":
version: 0.0.0-use.local
resolution: "pnpm-workspaces@workspace:input/pnpm-workspaces"
languageName: unknown
linkType: soft

"pure-js@workspace:input/pure-js":
version: 0.0.0-use.local
resolution: "pure-js@workspace:input/pure-js"
languageName: unknown
linkType: soft

"react-example@workspace:input/react":
version: 0.0.0-use.local
resolution: "react-example@workspace:input/react"
languageName: unknown
linkType: soft

"react@npm:18.0.0":
version: 18.0.0
resolution: "react@npm:18.0.0"
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.2"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==

csstype@^3.0.2:
version "3.0.11"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33"
integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==

"js-tokens@^3.0.0 || ^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

loose-envify@^1.1.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
dependencies:
loose-envify: ^1.1.0
checksum: 293020b96536b3c7113ee57ca5c990a3f25649d1751b1c7a3aabd16dff0691fe9f1eed1206616d0906d05933536052037340a0c8d0941ff870b0eb469a2f975b
languageName: node
linkType: hard
js-tokens "^3.0.0 || ^4.0.0"

"snapshots@workspace:.":
version: 0.0.0-use.local
resolution: "snapshots@workspace:."
[email protected]:
version "18.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.0.0.tgz#b468736d1f4a5891f38585ba8e8fb29f91c3cb96"
integrity sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A==
dependencies:
"@sourcegraph/tsconfig": 4.0.1
"@types/react": 17.0.52
react: 18.0.0
languageName: unknown
linkType: soft

"syntax@workspace:input/syntax":
version: 0.0.0-use.local
resolution: "syntax@workspace:input/syntax"
languageName: unknown
linkType: soft
loose-envify "^1.1.0"
6 changes: 4 additions & 2 deletions src/FileIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ export class FileIndexer {

private hasConstructor(classDeclaration: ts.ClassDeclaration): boolean {
const cached = this.globalConstructorTable.get(classDeclaration)
if (cached !== undefined) return cached
if (cached !== undefined) {
return cached
}

for (const member of classDeclaration.members) {
if (ts.isConstructorDeclaration(member)) {
Expand Down Expand Up @@ -552,7 +554,7 @@ export class FileIndexer {
case ts.ScriptElementKind.classElement:
case ts.ScriptElementKind.localClassElement:
if (ts.isConstructorDeclaration(node)) {
return 'constructor' + signature()!
return 'constructor' + (signature() || '')
}
return 'class ' + node.getText()
case ts.ScriptElementKind.interfaceElement:
Expand Down
Loading

0 comments on commit c597163

Please sign in to comment.