Skip to content

Commit

Permalink
chore: update pkg-dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf committed Aug 17, 2022
1 parent b80beec commit 10f19cb
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 61 deletions.
146 changes: 88 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -75,7 +75,7 @@
"devtools-protocol": "0.0.1019158",
"extract-zip": "2.0.1",
"https-proxy-agent": "5.0.1",
"pkg-dir": "4.2.0",
"pkg-dir": "7.0.0",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"rimraf": "3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/initializePuppeteer.ts
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {sync} from 'pkg-dir';
import {packageDirectorySync} from 'pkg-dir';
import {Product} from './common/Product.js';
import {rootDirname} from './constants.js';
import {PuppeteerNode} from './node/Puppeteer.js';
Expand All @@ -25,7 +25,7 @@ import {PUPPETEER_REVISIONS} from './revisions.js';
*/
export const initializePuppeteer = (packageName: string): PuppeteerNode => {
const isPuppeteerCore = packageName === 'puppeteer-core';
const puppeteerRootDirectory = sync(rootDirname);
const puppeteerRootDirectory = packageDirectorySync({cwd: rootDirname});
let preferredRevision = PUPPETEER_REVISIONS.chromium;
// puppeteer-core ignores environment variables
const productName = !isPuppeteerCore
Expand Down

0 comments on commit 10f19cb

Please sign in to comment.