Skip to content

Commit 13c46a9

Browse files
Coderabbit theme and fixes (#175)
* coderabbit theme * theme change * checkpoint * fixes * added coderabbit authentication
1 parent 33994b4 commit 13c46a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+360
-493
lines changed

.betterer.results

+2-18
Original file line numberDiff line numberDiff line change
@@ -1579,24 +1579,8 @@ exports[`better eslint`] = {
15791579
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
15801580
],
15811581
"public/app/core/services/backend_srv.ts:5381": [
1582-
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
1583-
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
1584-
[0, 0, 0, "Do not use any type assertions.", "2"],
1585-
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
1586-
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
1587-
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
1588-
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
1589-
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
1590-
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
1591-
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
1592-
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
1593-
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
1594-
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
1595-
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
1596-
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
1597-
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
1598-
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
1599-
[0, 0, 0, "Unexpected any. Specify a different type.", "17"]
1582+
[0, 0, 0, "Do not use any type assertions.", "0"],
1583+
[0, 0, 0, "Do not use any type assertions.", "1"]
16001584
],
16011585
"public/app/core/services/context_srv.ts:5381": [
16021586
[0, 0, 0, "Do not use any type assertions.", "0"],

.yarn/sdks/eslint/bin/eslint.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require eslint/bin/eslint.js
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

.yarn/sdks/eslint/lib/api.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require eslint
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire, register} = require(`module`);
5+
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
7+
8+
const relPnpApiPath = "../../../../.pnp.cjs";
9+
10+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11+
const absRequire = createRequire(absPnpApiPath);
12+
13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
16+
if (existsSync(absPnpApiPath)) {
17+
if (!process.versions.pnp) {
18+
// Setup the environment to be able to require eslint/use-at-your-own-risk
19+
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
23+
}
24+
}
25+
26+
// Defer to the real eslint/use-at-your-own-risk your application uses
27+
module.exports = absRequire(`eslint/use-at-your-own-risk`);

.yarn/sdks/eslint/package.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@
22
"name": "eslint",
33
"version": "8.44.0-sdk",
44
"main": "./lib/api.js",
5-
"type": "commonjs"
5+
"type": "commonjs",
6+
"bin": {
7+
"eslint": "./bin/eslint.js"
8+
},
9+
"exports": {
10+
"./package.json": "./package.json",
11+
".": "./lib/api.js",
12+
"./use-at-your-own-risk": "./lib/unsupported-api.js"
13+
}
614
}

.yarn/sdks/prettier/bin/prettier.cjs

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env node
2+
3+
const {existsSync} = require(`fs`);
4+
const {createRequire, register} = require(`module`);
5+
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
7+
8+
const relPnpApiPath = "../../../../.pnp.cjs";
9+
10+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11+
const absRequire = createRequire(absPnpApiPath);
12+
13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
16+
if (existsSync(absPnpApiPath)) {
17+
if (!process.versions.pnp) {
18+
// Setup the environment to be able to require prettier/bin/prettier.cjs
19+
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
23+
}
24+
}
25+
26+
// Defer to the real prettier/bin/prettier.cjs your application uses
27+
module.exports = absRequire(`prettier/bin/prettier.cjs`);

.yarn/sdks/prettier/index.js renamed to .yarn/sdks/prettier/index.cjs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require prettier
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

.yarn/sdks/prettier/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "prettier",
33
"version": "3.0.0-sdk",
4-
"main": "./index.js",
5-
"type": "commonjs"
4+
"main": "./index.cjs",
5+
"type": "commonjs",
6+
"bin": "./bin/prettier.cjs"
67
}

.yarn/sdks/typescript/bin/tsc

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require typescript/bin/tsc
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

.yarn/sdks/typescript/bin/tsserver

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require typescript/bin/tsserver
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

.yarn/sdks/typescript/lib/tsc.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
1418
// Setup the environment to be able to require typescript/lib/tsc.js
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

.yarn/sdks/typescript/lib/tsserver.js

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
16+
if (existsSync(absPnpApiPath)) {
17+
if (!process.versions.pnp) {
18+
// Setup the environment to be able to require typescript/lib/tsserver.js
19+
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
23+
}
24+
}
25+
1226
const moduleWrapper = tsserver => {
1327
if (!process.versions.pnp) {
1428
return tsserver;
@@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
214228
return tsserver;
215229
};
216230

217-
if (existsSync(absPnpApiPath)) {
218-
if (!process.versions.pnp) {
219-
// Setup the environment to be able to require typescript/lib/tsserver.js
220-
require(absPnpApiPath).setup();
221-
}
231+
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
232+
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
233+
// Ref https://github.com/microsoft/TypeScript/pull/55326
234+
if (major > 5 || (major === 5 && minor >= 5)) {
235+
moduleWrapper(absRequire(`typescript`));
222236
}
223237

224238
// Defer to the real typescript/lib/tsserver.js your application uses

.yarn/sdks/typescript/lib/tsserverlibrary.js

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
16+
if (existsSync(absPnpApiPath)) {
17+
if (!process.versions.pnp) {
18+
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
19+
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
23+
}
24+
}
25+
1226
const moduleWrapper = tsserver => {
1327
if (!process.versions.pnp) {
1428
return tsserver;
@@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
214228
return tsserver;
215229
};
216230

217-
if (existsSync(absPnpApiPath)) {
218-
if (!process.versions.pnp) {
219-
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
220-
require(absPnpApiPath).setup();
221-
}
231+
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
232+
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
233+
// Ref https://github.com/microsoft/TypeScript/pull/55326
234+
if (major > 5 || (major === 5 && minor >= 5)) {
235+
moduleWrapper(absRequire(`typescript`));
222236
}
223237

224238
// Defer to the real typescript/lib/tsserverlibrary.js your application uses
+11-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire} = require(`module`);
4+
const {createRequire, register} = require(`module`);
55
const {resolve} = require(`path`);
6+
const {pathToFileURL} = require(`url`);
67

78
const relPnpApiPath = "../../../../.pnp.cjs";
89

910
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
1011
const absRequire = createRequire(absPnpApiPath);
1112

13+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15+
1216
if (existsSync(absPnpApiPath)) {
1317
if (!process.versions.pnp) {
14-
// Setup the environment to be able to require typescript/lib/typescript.js
18+
// Setup the environment to be able to require typescript
1519
require(absPnpApiPath).setup();
20+
if (isPnpLoaderEnabled && register) {
21+
register(pathToFileURL(absPnpLoaderPath));
22+
}
1623
}
1724
}
1825

19-
// Defer to the real typescript/lib/typescript.js your application uses
20-
module.exports = absRequire(`typescript/lib/typescript.js`);
26+
// Defer to the real typescript your application uses
27+
module.exports = absRequire(`typescript`);

0 commit comments

Comments
 (0)