Skip to content

Commit

Permalink
fix: Revert bad string replacements
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rhcarvalho authored and kamilogorek committed Mar 25, 2020
1 parent 3627fe0 commit f2a3c28
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion packages/raven-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- fix: Remove a redundant try-catch block (#445)
- fix: Do not override context when capturing non-error exceptions (#444)
- fix: Update stack-trace to handle spaces in paths (#437)
- docs: Remove private _DSNs from the docs (#447)
- docs: Remove private DSNs from the docs (#447)
- docs: Update Usage docs to include Domains in Promise support (#438)

## 2.4.2 - 2018-02-27
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ extend(Raven.prototype, {
'X-Sentry-Auth': utils.getAuthHeader(
timestamp,
self.dsn.public_key,
self.dsn.private __key
self.dsn.private_key
),
'Content-Type': 'application/octet-stream',
'Content-Length': message.length
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ module.exports.parseDSN = function parseDSN(dsn) {
};

if (parsed.auth.split(':')[1]) {
response.private __key = parsed.auth.split(':')[1];
response.private_key = parsed.auth.split(':')[1];
}

if (~response.protocol.indexOf('+')) {
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/capture.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/capture_callback.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/capture_with_second_error.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/domain_capture.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/domain_capture_callback.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/domain_throw_on_send.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

Raven.config(dsn).install(function(err, sendErr) {
assert.ok(err instanceof Error);
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/throw_on_fatal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

var nock = require('nock');
var scope = nock('https://app.getsentry.com')
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/exit/throw_on_send.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private _@app.getsentry.com/269';
var dsn = 'https://public:private@app.getsentry.com/269';

Raven.config(dsn).install(function(err, sendErr) {
assert.ok(err instanceof Error);
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/manual/context-memory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
var Raven = require('../../');
Raven.config('https://public:private _@app.getsentry.com/12345').install();
Raven.config('https://public:private@app.getsentry.com/12345').install();

// We create a bunch of contexts, capture some breadcrumb data in all of them,
// then watch memory usage. It'll go up to ~40 megs then after 10 or 20 seconds
Expand Down
2 changes: 1 addition & 1 deletion packages/raven-node/test/manual/express-patient.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ console.log = function () {};

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

var sentryDsn = 'https://public:private _@app.getsentry.com/269';
var sentryDsn = 'https://public:private@app.getsentry.com/269';
Raven.config(sentryDsn, {
autoBreadcrumbs: true
}).install();
Expand Down
20 changes: 10 additions & 10 deletions packages/raven-node/test/raven.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var raven = require('../'),
zlib = require('zlib'),
child_process = require('child_process');

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

var _oldConsoleWarn = console.warn;

Expand Down Expand Up @@ -53,7 +53,7 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'public',
private __key: 'private _',
private_key: 'private',
host: 'app.getsentry.com',
path: '/',
project_id: '269',
Expand All @@ -70,7 +70,7 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'abc',
private __key: '123',
private_key: '123',
host: 'app.getsentry.com',
path: '/',
project_id: '1',
Expand All @@ -86,7 +86,7 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'abc',
private __key: '123',
private_key: '123',
host: 'app.getsentry.com',
path: '/',
project_id: '1',
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('raven.Client', function() {
});

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

var dsn = 'https://public:private _@app.getsentry.com:8443/269';
var dsn = 'https://public:private@app.getsentry.com:8443/269';
var client = new raven.Client(dsn);
client.on('logged', function() {
scope.done();
Expand Down Expand Up @@ -364,7 +364,7 @@ describe('raven.Client', function() {
return 'OK';
});

var dsn = 'https://public:private _@app.getsentry.com:8443/269';
var dsn = 'https://public:private@app.getsentry.com:8443/269';
var client = new raven.Client(dsn);
client.on('logged', function() {
scope.done();
Expand Down Expand Up @@ -998,13 +998,13 @@ describe('raven.Client', function() {
var expected = {
protocol: 'https',
public_key: 'public',
private __key: 'private _',
private_key: 'private',
host: 'app.getsentry.com',
path: '/',
project_id: '269',
port: 443
};
var dsn = 'heka+https://public:private _@app.getsentry.com/269';
var dsn = 'heka+https://public:private@app.getsentry.com/269';
var client = new raven.Client(dsn, {
transport: 'some_heka_instance'
});
Expand All @@ -1013,7 +1013,7 @@ describe('raven.Client', function() {
});

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

var scope = nock('https://app.getsentry.com')
Expand Down
10 changes: 5 additions & 5 deletions packages/raven-node/test/raven.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'https',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'app.getsentry.com',
path: '/',
project_id: '269',
Expand All @@ -46,7 +46,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'http',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'mysentry.com',
path: '/some/other/path/',
project_id: '269',
Expand All @@ -62,7 +62,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'https',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'mysentry.com',
path: '/some/other/path/',
project_id: '269',
Expand Down Expand Up @@ -91,7 +91,7 @@ describe('raven.utils', function() {
var expected = {
protocol: 'https',
public_key: '8769c40cf49c4cc58b51fa45d8e2d166',
private __key: '296768aa91084e17b5ac02d3ad5bc7e7',
private_key: '296768aa91084e17b5ac02d3ad5bc7e7',
host: 'mysentry.com',
path: '/some/other/path/',
project_id: '269',
Expand All @@ -100,7 +100,7 @@ describe('raven.utils', function() {
dsn.should.eql(expected);
});

it('should parse DSN without private _key', function() {
it('should parse DSN without private key', function() {
var dsn = raven.utils.parseDSN(
'https://8769c40cf49c4cc58b51fa45d8e2d166@mysentry.com:8443/some/other/path/269'
);
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/dsn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface DsnComponents {
protocol: DsnProtocol;
/** Public authorization key. */
user: string;
/** private _authorization key (deprecated, optional). */
/** Private authorization key (deprecated, optional). */
pass?: string;
/** Hostname of the Sentry instance. */
host: string;
Expand All @@ -28,7 +28,7 @@ export interface Dsn extends DsnComponents {
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private _representation, set `withPassword`
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"homepage": "https://github.com/getsentry/raven-js/tree/master/packages/typescript",
"author": "Sentry",
"license": "BSD-3-Clause",
"private _": false,
"private": false,
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/dsn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Dsn implements DsnComponents {
public protocol!: DsnProtocol;
/** Public authorization key. */
public user!: string;
/** private _authorization key (deprecated, optional). */
/** Private authorization key (deprecated, optional). */
public pass!: string;
/** Hostname of the Sentry instance. */
public host!: string;
Expand All @@ -40,7 +40,7 @@ export class Dsn implements DsnComponents {
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private _representation, set `withPassword`
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface SentryGlobal {
}

/**
* Requires a module which is protected _against bundler minification.
* Requires a module which is protected against bundler minification.
*
* @param request The module path to resolve
*/
Expand Down

0 comments on commit f2a3c28

Please sign in to comment.