Skip to content

Commit dfc1fe1

Browse files
committed
Release 0.0.43
1 parent f4113d3 commit dfc1fe1

File tree

14 files changed

+121
-63
lines changed

14 files changed

+121
-63
lines changed

.yarn/sdks/prettier/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire, createRequireFromPath} = require(`module`);
4+
const {createRequire} = require(`module`);
55
const {resolve} = require(`path`);
66

77
const relPnpApiPath = "../../../.pnp.cjs";
88

99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10-
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
1111

1212
if (existsSync(absPnpApiPath)) {
1313
if (!process.versions.pnp) {

.yarn/sdks/typescript/bin/tsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire, createRequireFromPath} = require(`module`);
4+
const {createRequire} = require(`module`);
55
const {resolve} = require(`path`);
66

77
const relPnpApiPath = "../../../../.pnp.cjs";
88

99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10-
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
1111

1212
if (existsSync(absPnpApiPath)) {
1313
if (!process.versions.pnp) {

.yarn/sdks/typescript/bin/tsserver

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire, createRequireFromPath} = require(`module`);
4+
const {createRequire} = require(`module`);
55
const {resolve} = require(`path`);
66

77
const relPnpApiPath = "../../../../.pnp.cjs";
88

99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10-
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
1111

1212
if (existsSync(absPnpApiPath)) {
1313
if (!process.versions.pnp) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire, createRequireFromPath} = require(`module`);
4+
const {createRequire} = require(`module`);
55
const {resolve} = require(`path`);
66

77
const relPnpApiPath = "../../../../.pnp.cjs";
88

99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10-
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
1111

1212
if (existsSync(absPnpApiPath)) {
1313
if (!process.versions.pnp) {

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

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire, createRequireFromPath} = require(`module`);
4+
const {createRequire} = require(`module`);
55
const {resolve} = require(`path`);
66

77
const relPnpApiPath = "../../../../.pnp.cjs";
88

99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10-
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
1111

1212
const moduleWrapper = tsserver => {
1313
if (!process.versions.pnp) {
@@ -61,14 +61,30 @@ const moduleWrapper = tsserver => {
6161
//
6262
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
6363
//
64-
// Update Oct 8 2021: VSCode changed their format in 1.61.
64+
// 2021-10-08: VSCode changed the format in 1.61.
6565
// Before | ^zip:/c:/foo/bar.zip/package.json
6666
// After | ^/zip//c:/foo/bar.zip/package.json
6767
//
68+
// 2022-04-06: VSCode changed the format in 1.66.
69+
// Before | ^/zip//c:/foo/bar.zip/package.json
70+
// After | ^/zip/c:/foo/bar.zip/package.json
71+
//
72+
// 2022-05-06: VSCode changed the format in 1.68
73+
// Before | ^/zip/c:/foo/bar.zip/package.json
74+
// After | ^/zip//c:/foo/bar.zip/package.json
75+
//
6876
case `vscode <1.61`: {
6977
str = `^zip:${str}`;
7078
} break;
7179

80+
case `vscode <1.66`: {
81+
str = `^/zip/${str}`;
82+
} break;
83+
84+
case `vscode <1.68`: {
85+
str = `^/zip${str}`;
86+
} break;
87+
7288
case `vscode`: {
7389
str = `^/zip/${str}`;
7490
} break;
@@ -93,6 +109,8 @@ const moduleWrapper = tsserver => {
93109
str = `zip:${str}`;
94110
} break;
95111
}
112+
} else {
113+
str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`);
96114
}
97115
}
98116

@@ -119,9 +137,7 @@ const moduleWrapper = tsserver => {
119137

120138
case `vscode`:
121139
default: {
122-
return process.platform === `win32`
123-
? str.replace(/^\^?(zip:|\/zip)\/+/, ``)
124-
: str.replace(/^\^?(zip:|\/zip)\/+/, `/`);
140+
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
125141
} break;
126142
}
127143
}
@@ -160,8 +176,21 @@ const moduleWrapper = tsserver => {
160176
typeof parsedMessage.arguments.hostInfo === `string`
161177
) {
162178
hostInfo = parsedMessage.arguments.hostInfo;
163-
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
164-
hostInfo += ` <1.61`;
179+
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
180+
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
181+
// The RegExp from https://semver.org/ but without the caret at the start
182+
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
183+
) ?? []).map(Number)
184+
185+
if (major === 1) {
186+
if (minor < 61) {
187+
hostInfo += ` <1.61`;
188+
} else if (minor < 66) {
189+
hostInfo += ` <1.66`;
190+
} else if (minor < 68) {
191+
hostInfo += ` <1.68`;
192+
}
193+
}
165194
}
166195
}
167196

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

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire, createRequireFromPath} = require(`module`);
4+
const {createRequire} = require(`module`);
55
const {resolve} = require(`path`);
66

77
const relPnpApiPath = "../../../../.pnp.cjs";
88

99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10-
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
1111

1212
const moduleWrapper = tsserver => {
1313
if (!process.versions.pnp) {
@@ -61,14 +61,30 @@ const moduleWrapper = tsserver => {
6161
//
6262
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
6363
//
64-
// Update Oct 8 2021: VSCode changed their format in 1.61.
64+
// 2021-10-08: VSCode changed the format in 1.61.
6565
// Before | ^zip:/c:/foo/bar.zip/package.json
6666
// After | ^/zip//c:/foo/bar.zip/package.json
6767
//
68+
// 2022-04-06: VSCode changed the format in 1.66.
69+
// Before | ^/zip//c:/foo/bar.zip/package.json
70+
// After | ^/zip/c:/foo/bar.zip/package.json
71+
//
72+
// 2022-05-06: VSCode changed the format in 1.68
73+
// Before | ^/zip/c:/foo/bar.zip/package.json
74+
// After | ^/zip//c:/foo/bar.zip/package.json
75+
//
6876
case `vscode <1.61`: {
6977
str = `^zip:${str}`;
7078
} break;
7179

80+
case `vscode <1.66`: {
81+
str = `^/zip/${str}`;
82+
} break;
83+
84+
case `vscode <1.68`: {
85+
str = `^/zip${str}`;
86+
} break;
87+
7288
case `vscode`: {
7389
str = `^/zip/${str}`;
7490
} break;
@@ -93,6 +109,8 @@ const moduleWrapper = tsserver => {
93109
str = `zip:${str}`;
94110
} break;
95111
}
112+
} else {
113+
str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`);
96114
}
97115
}
98116

@@ -119,9 +137,7 @@ const moduleWrapper = tsserver => {
119137

120138
case `vscode`:
121139
default: {
122-
return process.platform === `win32`
123-
? str.replace(/^\^?(zip:|\/zip)\/+/, ``)
124-
: str.replace(/^\^?(zip:|\/zip)\/+/, `/`);
140+
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
125141
} break;
126142
}
127143
}
@@ -160,8 +176,21 @@ const moduleWrapper = tsserver => {
160176
typeof parsedMessage.arguments.hostInfo === `string`
161177
) {
162178
hostInfo = parsedMessage.arguments.hostInfo;
163-
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
164-
hostInfo += ` <1.61`;
179+
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
180+
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
181+
// The RegExp from https://semver.org/ but without the caret at the start
182+
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
183+
) ?? []).map(Number)
184+
185+
if (major === 1) {
186+
if (minor < 61) {
187+
hostInfo += ` <1.61`;
188+
} else if (minor < 66) {
189+
hostInfo += ` <1.66`;
190+
} else if (minor < 68) {
191+
hostInfo += ` <1.68`;
192+
}
193+
}
165194
}
166195
}
167196

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22

33
const {existsSync} = require(`fs`);
4-
const {createRequire, createRequireFromPath} = require(`module`);
4+
const {createRequire} = require(`module`);
55
const {resolve} = require(`path`);
66

77
const relPnpApiPath = "../../../../.pnp.cjs";
88

99
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
10-
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
10+
const absRequire = createRequire(absPnpApiPath);
1111

1212
if (existsSync(absPnpApiPath)) {
1313
if (!process.versions.pnp) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ravenapp/raven",
3-
"version": "0.0.42",
3+
"version": "0.0.43",
44
"repository": "https://github.com/ravenappdev/raven-node",
55
"files": [
66
"dist",

src/Client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Client as UserClient } from "./api/resources/user/client/Client";
1414
export declare namespace RavenApiClient {
1515
interface Options {
1616
environment?: environments.RavenApiEnvironment | string;
17-
authorization?: core.Supplier<string>;
17+
authKey?: core.Supplier<string>;
1818
}
1919
}
2020

@@ -35,7 +35,7 @@ export class RavenApiClient {
3535
method: "POST",
3636
headers: {
3737
"Idempotency-Key": idempotencyKey,
38-
Authorization: await core.Supplier.get(this.options.authorization),
38+
Authorization: await core.Supplier.get(this.options.authKey),
3939
},
4040
body: await serializers.SendEventRequest.json(_body),
4141
});
@@ -87,7 +87,7 @@ export class RavenApiClient {
8787
method: "POST",
8888
headers: {
8989
"Idempotency-Key": idempotencyKey,
90-
Authorization: await core.Supplier.get(this.options.authorization),
90+
Authorization: await core.Supplier.get(this.options.authKey),
9191
},
9292
body: await serializers.BulkSendEventRequest.json(_body),
9393
});

src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from "./resources";
21
export * from "./types";
2+
export * from "./resources";
33
export * from "./errors";
44
export * from "./client";

0 commit comments

Comments
 (0)