Skip to content

Commit f2a3c28

Browse files
rhcarvalhokamilogorek
authored andcommitted
fix: Revert bad string replacements
Fixes changes introduced in 8c60b1e. Global string replacement was too eager and broke things in raven-node (although development head is actually in the 4.x branch). Other than that, this commit fixes doc comments and an entry in packages/typescript/package.json.
1 parent 3627fe0 commit f2a3c28

21 files changed

+36
-36
lines changed

packages/raven-node/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
- fix: Remove a redundant try-catch block (#445)
3232
- fix: Do not override context when capturing non-error exceptions (#444)
3333
- fix: Update stack-trace to handle spaces in paths (#437)
34-
- docs: Remove private _DSNs from the docs (#447)
34+
- docs: Remove private DSNs from the docs (#447)
3535
- docs: Update Usage docs to include Domains in Promise support (#438)
3636

3737
## 2.4.2 - 2018-02-27

packages/raven-node/lib/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ extend(Raven.prototype, {
341341
'X-Sentry-Auth': utils.getAuthHeader(
342342
timestamp,
343343
self.dsn.public_key,
344-
self.dsn.private __key
344+
self.dsn.private_key
345345
),
346346
'Content-Type': 'application/octet-stream',
347347
'Content-Length': message.length

packages/raven-node/lib/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ module.exports.parseDSN = function parseDSN(dsn) {
188188
};
189189

190190
if (parsed.auth.split(':')[1]) {
191-
response.private __key = parsed.auth.split(':')[1];
191+
response.private_key = parsed.auth.split(':')[1];
192192
}
193193

194194
if (~response.protocol.indexOf('+')) {

packages/raven-node/test/exit/capture.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
var Raven = require('../../');
3-
var dsn = 'https://public:private _@app.getsentry.com/269';
3+
var dsn = 'https://public:private@app.getsentry.com/269';
44

55
var nock = require('nock');
66
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/capture_callback.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
var Raven = require('../../');
33
var assert = require('assert');
4-
var dsn = 'https://public:private _@app.getsentry.com/269';
4+
var dsn = 'https://public:private@app.getsentry.com/269';
55

66
var nock = require('nock');
77
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/capture_with_second_domain_error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
var Raven = require('../../');
33
var assert = require('assert');
4-
var dsn = 'https://public:private _@app.getsentry.com/269';
4+
var dsn = 'https://public:private@app.getsentry.com/269';
55

66
var nock = require('nock');
77
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/capture_with_second_error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
var Raven = require('../../');
33
var assert = require('assert');
4-
var dsn = 'https://public:private _@app.getsentry.com/269';
4+
var dsn = 'https://public:private@app.getsentry.com/269';
55

66
var nock = require('nock');
77
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/domain_capture.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
var Raven = require('../../');
3-
var dsn = 'https://public:private _@app.getsentry.com/269';
3+
var dsn = 'https://public:private@app.getsentry.com/269';
44

55
var nock = require('nock');
66
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/domain_capture_callback.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
var Raven = require('../../');
33
var assert = require('assert');
4-
var dsn = 'https://public:private _@app.getsentry.com/269';
4+
var dsn = 'https://public:private@app.getsentry.com/269';
55

66
var nock = require('nock');
77
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/domain_capture_with_second_error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
var Raven = require('../../');
33
var assert = require('assert');
4-
var dsn = 'https://public:private _@app.getsentry.com/269';
4+
var dsn = 'https://public:private@app.getsentry.com/269';
55

66
var nock = require('nock');
77
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/domain_throw_on_send.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
var Raven = require('../../');
33
var assert = require('assert');
4-
var dsn = 'https://public:private _@app.getsentry.com/269';
4+
var dsn = 'https://public:private@app.getsentry.com/269';
55

66
Raven.config(dsn).install(function(err, sendErr) {
77
assert.ok(err instanceof Error);

packages/raven-node/test/exit/throw_on_fatal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
var Raven = require('../../');
3-
var dsn = 'https://public:private _@app.getsentry.com/269';
3+
var dsn = 'https://public:private@app.getsentry.com/269';
44

55
var nock = require('nock');
66
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/exit/throw_on_send.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
var Raven = require('../../');
33
var assert = require('assert');
4-
var dsn = 'https://public:private _@app.getsentry.com/269';
4+
var dsn = 'https://public:private@app.getsentry.com/269';
55

66
Raven.config(dsn).install(function(err, sendErr) {
77
assert.ok(err instanceof Error);

packages/raven-node/test/manual/context-memory.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
var Raven = require('../../');
3-
Raven.config('https://public:private _@app.getsentry.com/12345').install();
3+
Raven.config('https://public:private@app.getsentry.com/12345').install();
44

55
// We create a bunch of contexts, capture some breadcrumb data in all of them,
66
// then watch memory usage. It'll go up to ~40 megs then after 10 or 20 seconds

packages/raven-node/test/manual/express-patient.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ console.log = function () {};
55

66
var Raven = require('../../');
77

8-
var sentryDsn = 'https://public:private _@app.getsentry.com/269';
8+
var sentryDsn = 'https://public:private@app.getsentry.com/269';
99
Raven.config(sentryDsn, {
1010
autoBreadcrumbs: true
1111
}).install();

packages/raven-node/test/raven.client.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var raven = require('../'),
1111
zlib = require('zlib'),
1212
child_process = require('child_process');
1313

14-
var dsn = 'https://public:private _@app.getsentry.com/269';
14+
var dsn = 'https://public:private@app.getsentry.com/269';
1515

1616
var _oldConsoleWarn = console.warn;
1717

@@ -53,7 +53,7 @@ describe('raven.Client', function() {
5353
var expected = {
5454
protocol: 'https',
5555
public_key: 'public',
56-
private __key: 'private _',
56+
private_key: 'private',
5757
host: 'app.getsentry.com',
5858
path: '/',
5959
project_id: '269',
@@ -70,7 +70,7 @@ describe('raven.Client', function() {
7070
var expected = {
7171
protocol: 'https',
7272
public_key: 'abc',
73-
private __key: '123',
73+
private_key: '123',
7474
host: 'app.getsentry.com',
7575
path: '/',
7676
project_id: '1',
@@ -86,7 +86,7 @@ describe('raven.Client', function() {
8686
var expected = {
8787
protocol: 'https',
8888
public_key: 'abc',
89-
private __key: '123',
89+
private_key: '123',
9090
host: 'app.getsentry.com',
9191
path: '/',
9292
project_id: '1',
@@ -208,7 +208,7 @@ describe('raven.Client', function() {
208208
});
209209

210210
it('should allow for attaching stacktrace', function(done) {
211-
var dsn = 'https://public:private _@app.getsentry.com:8443/269';
211+
var dsn = 'https://public:private@app.getsentry.com:8443/269';
212212
var client = new raven.Client(dsn, {
213213
stacktrace: true
214214
});
@@ -317,7 +317,7 @@ describe('raven.Client', function() {
317317
.post('/api/269/store/', '*')
318318
.reply(200, 'OK');
319319

320-
var dsn = 'https://public:private _@app.getsentry.com:8443/269';
320+
var dsn = 'https://public:private@app.getsentry.com:8443/269';
321321
var client = new raven.Client(dsn);
322322
client.on('logged', function() {
323323
scope.done();
@@ -364,7 +364,7 @@ describe('raven.Client', function() {
364364
return 'OK';
365365
});
366366

367-
var dsn = 'https://public:private _@app.getsentry.com:8443/269';
367+
var dsn = 'https://public:private@app.getsentry.com:8443/269';
368368
var client = new raven.Client(dsn);
369369
client.on('logged', function() {
370370
scope.done();
@@ -998,13 +998,13 @@ describe('raven.Client', function() {
998998
var expected = {
999999
protocol: 'https',
10001000
public_key: 'public',
1001-
private __key: 'private _',
1001+
private_key: 'private',
10021002
host: 'app.getsentry.com',
10031003
path: '/',
10041004
project_id: '269',
10051005
port: 443
10061006
};
1007-
var dsn = 'heka+https://public:private _@app.getsentry.com/269';
1007+
var dsn = 'heka+https://public:private@app.getsentry.com/269';
10081008
var client = new raven.Client(dsn, {
10091009
transport: 'some_heka_instance'
10101010
});
@@ -1013,7 +1013,7 @@ describe('raven.Client', function() {
10131013
});
10141014

10151015
it('should use a DSN subpath when sending requests', function(done) {
1016-
var dsn = 'https://public:private _@app.getsentry.com/some/path/269';
1016+
var dsn = 'https://public:private@app.getsentry.com/some/path/269';
10171017
var client = new raven.Client(dsn);
10181018

10191019
var scope = nock('https://app.getsentry.com')

packages/raven-node/test/raven.utils.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('raven.utils', function() {
3030
var expected = {
3131
protocol: 'https',
3232
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
33-
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
33+
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
3434
host: 'app.getsentry.com',
3535
path: '/',
3636
project_id: '269',
@@ -46,7 +46,7 @@ describe('raven.utils', function() {
4646
var expected = {
4747
protocol: 'http',
4848
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
49-
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
49+
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
5050
host: 'mysentry.com',
5151
path: '/some/other/path/',
5252
project_id: '269',
@@ -62,7 +62,7 @@ describe('raven.utils', function() {
6262
var expected = {
6363
protocol: 'https',
6464
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
65-
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
65+
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
6666
host: 'mysentry.com',
6767
path: '/some/other/path/',
6868
project_id: '269',
@@ -91,7 +91,7 @@ describe('raven.utils', function() {
9191
var expected = {
9292
protocol: 'https',
9393
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
94-
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
94+
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
9595
host: 'mysentry.com',
9696
path: '/some/other/path/',
9797
project_id: '269',
@@ -100,7 +100,7 @@ describe('raven.utils', function() {
100100
dsn.should.eql(expected);
101101
});
102102

103-
it('should parse DSN without private _key', function() {
103+
it('should parse DSN without private key', function() {
104104
var dsn = raven.utils.parseDSN(
105105
'https://8769c40cf49c4cc58b51fa45d8e2d166@mysentry.com:8443/some/other/path/269'
106106
);

packages/types/src/dsn.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface DsnComponents {
77
protocol: DsnProtocol;
88
/** Public authorization key. */
99
user: string;
10-
/** private _authorization key (deprecated, optional). */
10+
/** Private authorization key (deprecated, optional). */
1111
pass?: string;
1212
/** Hostname of the Sentry instance. */
1313
host: string;
@@ -28,7 +28,7 @@ export interface Dsn extends DsnComponents {
2828
* Renders the string representation of this Dsn.
2929
*
3030
* By default, this will render the public representation without the password
31-
* component. To get the deprecated private _representation, set `withPassword`
31+
* component. To get the deprecated private representation, set `withPassword`
3232
* to true.
3333
*
3434
* @param withPassword When set to true, the password will be included.

packages/typescript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"homepage": "https://github.com/getsentry/raven-js/tree/master/packages/typescript",
77
"author": "Sentry",
88
"license": "BSD-3-Clause",
9-
"private _": false,
9+
"private": false,
1010
"publishConfig": {
1111
"access": "public"
1212
},

packages/utils/src/dsn.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class Dsn implements DsnComponents {
1414
public protocol!: DsnProtocol;
1515
/** Public authorization key. */
1616
public user!: string;
17-
/** private _authorization key (deprecated, optional). */
17+
/** Private authorization key (deprecated, optional). */
1818
public pass!: string;
1919
/** Hostname of the Sentry instance. */
2020
public host!: string;
@@ -40,7 +40,7 @@ export class Dsn implements DsnComponents {
4040
* Renders the string representation of this Dsn.
4141
*
4242
* By default, this will render the public representation without the password
43-
* component. To get the deprecated private _representation, set `withPassword`
43+
* component. To get the deprecated private representation, set `withPassword`
4444
* to true.
4545
*
4646
* @param withPassword When set to true, the password will be included.

packages/utils/src/misc.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface SentryGlobal {
2121
}
2222

2323
/**
24-
* Requires a module which is protected _against bundler minification.
24+
* Requires a module which is protected against bundler minification.
2525
*
2626
* @param request The module path to resolve
2727
*/

0 commit comments

Comments
 (0)