Skip to content

Commit ebde15f

Browse files
fix linting issues
1 parent 24df9e7 commit ebde15f

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

packages/web-api/src/instrument.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,18 @@ describe('instrument', () => {
6161
});
6262

6363
it('should return a Latin-1 safe user agent when process.title contains non-Latin-1 characters', () => {
64-
const notLatin1SafeTitle = '管理者: Windows PowerShell'
64+
const notLatin1SafeTitle = '管理者: Windows PowerShell';
6565
assert.strictEqual(isLatin1Safe(notLatin1SafeTitle), false);
6666

6767
mockProcessTitle(notLatin1SafeTitle);
6868
const { getUserAgent } = freshImport();
6969
const ua = getUserAgent();
7070
assert.ok(isLatin1Safe(ua), `User-Agent contains non-Latin-1 characters: ${ua}`);
7171
assert.ok(!ua.includes(notLatin1SafeTitle), 'User-Agent should not contain raw non-ASCII characters');
72-
assert.ok(ua.includes('%E7%AE%A1%E7%90%86%E8%80%85: Windows PowerShell'), 'User-Agent should percent-encode only non-Latin-1 characters');
72+
assert.ok(
73+
ua.includes('%E7%AE%A1%E7%90%86%E8%80%85: Windows PowerShell'),
74+
'User-Agent should percent-encode only non-Latin-1 characters',
75+
);
7376
});
7477

7578
it('should preserve Latin-1 characters in process.title', () => {

packages/web-api/src/instrument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function replaceSlashes(s: string): string {
1010
return s.replace('/', ':');
1111
}
1212

13-
const MAX_LATIN1_CODE = 0xFF;
13+
const MAX_LATIN1_CODE = 0xff;
1414

1515
/**
1616
* Ensures a string is safe for use in HTTP headers by URI-encoding characters outside the Latin-1 (ISO-8859-1) range.

0 commit comments

Comments
 (0)