Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit 56e5eb7

Browse files
authored
Revert "chore(deps): upgrade pprof to v3.3.0 [security] (#883)" (#884)
This reverts commit c61fb85.
1 parent c61fb85 commit 56e5eb7

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
"system-test": "c8 --no-clean mocha build/system-test/test-*.js --timeout=60000",
1111
"samples-test": "echo 'no sample tests'",
1212
"clean": "gts clean",
13-
"compile": "tsc -p .",
13+
"compile": "tsc -p . && cp -R protos build",
1414
"fix": "gts fix",
1515
"lint": "gts check",
1616
"docs": "jsdoc -c .jsdoc.js",
1717
"prelint": "cd samples; npm link ../; npm install",
1818
"prepare": "npm run compile",
1919
"pretest": "npm run compile",
20+
"proto": "mkdir -p protos && pbjs -t static-module -w commonjs -o protos/profiler.js third_party/googleapis/google/devtools/cloudprofiler/v2/profiler.proto && pbts -o protos/profiler.d.ts protos/profiler.js",
2021
"license-check": "jsgl --local .",
2122
"docs-test": "linkinator docs",
2223
"predocs-test": "npm run docs",
@@ -36,9 +37,9 @@
3637
"extend": "^3.0.2",
3738
"gcp-metadata": "^4.0.0",
3839
"parse-duration": "^1.0.0",
39-
"pprof": "3.2.1",
40+
"pprof": "3.2.0",
4041
"pretty-ms": "^7.0.0",
41-
"protobufjs": "~7.2.4",
42+
"protobufjs": "~7.2.0",
4243
"semver": "^7.0.0",
4344
"teeny-request": "^8.0.0"
4445
},
@@ -68,10 +69,12 @@
6869
},
6970
"files": [
7071
"build/src",
71-
"build/third_party/cloud-debug-nodejs"
72+
"build/third_party/cloud-debug-nodejs",
73+
"build/protos"
7274
],
7375
"nyc": {
7476
"exclude": [
77+
"protos",
7578
"build/test",
7679
"build/system-test"
7780
]

src/profiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import {
2020
DecorateRequestOptions,
2121
} from '@google-cloud/common';
2222
import {heap as heapProfiler, SourceMapper, time as timeProfiler} from 'pprof';
23-
import {perftools} from 'pprof/proto/profile';
2423
import * as msToStr from 'pretty-ms';
2524
import {promisify} from 'util';
2625
import * as zlib from 'zlib';
2726
import * as r from 'teeny-request';
2827

28+
import {perftools} from '../protos/profile';
2929
import {ProfilerConfig} from './config';
3030
import {createLogger} from './logger';
3131

system-test/test-start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import * as nock from 'nock';
1919
import {promisify} from 'util';
2020
import * as zlib from 'zlib';
2121

22-
import {perftools} from 'pprof/proto/profile';
22+
import {perftools} from '../protos/profile';
2323
import {RequestProfile} from '../src/profiler';
2424

2525
const API = 'https://cloudprofiler.googleapis.com/v2';

test/profiles-for-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import * as path from 'path';
1717
import {SourceMapGenerator} from 'source-map';
1818
import * as tmp from 'tmp';
1919

20-
import {perftools} from 'pprof/proto/profile';
20+
import {perftools} from '../protos/profile';
2121
import {TimeProfile} from '../src/v8-types';
2222

2323
const timeLeaf1 = {

test/test-profiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import * as sinon from 'sinon';
2626
import {promisify} from 'util';
2727
import * as zlib from 'zlib';
2828

29-
import {perftools} from 'pprof/proto/profile';
29+
import {perftools} from '../protos/profile';
3030
import {ProfilerConfig} from '../src/config';
3131
import {
3232
parseBackoffDuration,

0 commit comments

Comments
 (0)