Skip to content

Commit

Permalink
fix(deps): replace dependency read-pkg-up with read-package-up ^11.0.0 (
Browse files Browse the repository at this point in the history
#5504)

* fix(deps): replace dependency read-pkg-up with read-package-up ^11.0.0

* chore(deps): update package name in imports

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mateusz Bocian <mateusz.bocian@netlify.com>
Co-authored-by: Mateusz Bocian <mrstork@users.noreply.github.com>
  • Loading branch information
3 people committed May 13, 2024
1 parent ad536fb commit d32e5bd
Show file tree
Hide file tree
Showing 15 changed files with 137 additions and 35 deletions.
142 changes: 122 additions & 20 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 packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"pkg-dir": "^7.0.0",
"pretty-ms": "^8.0.0",
"ps-list": "^8.0.0",
"read-pkg-up": "^9.0.0",
"read-package-up": "^11.0.0",
"readdirp": "^3.4.0",
"resolve": "^2.0.0-next.1",
"rfdc": "^1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/plugins/compatibility.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _pEvery from 'p-every'
import pLocate from 'p-locate'
import { PackageJson } from 'read-pkg-up'
import { PackageJson } from 'read-package-up'
import semver from 'semver'

import { FeatureFlags } from '../core/feature_flags.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/plugins/expected_version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackageJson } from 'read-pkg-up'
import { PackageJson } from 'read-package-up'
import semver from 'semver'

import { FeatureFlags } from '../core/feature_flags.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/plugins/manifest/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackageJson } from 'read-pkg-up'
import { PackageJson } from 'read-package-up'

import { addPluginLoadErrorStatus } from '../../status/load_error.js'

Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/plugins/options.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { dirname } from 'path'

import { PackageJson } from 'read-pkg-up'
import { PackageJson } from 'read-package-up'
import semver from 'semver'

import { addErrorInfo } from '../error/info.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/plugins/plugin_conditions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { join } from 'path'

import _pEvery from 'p-every'
import { PackageJson } from 'read-pkg-up'
import { PackageJson } from 'read-package-up'
import semver from 'semver'

import { importJsonFile } from '../utils/json.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/utils/json.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFile } from 'fs/promises'
import { fileURLToPath } from 'url'

import type { PackageJson } from 'read-pkg-up'
import type { PackageJson } from 'read-package-up'

// We know how our package.json looks like, so we can be very specific with the type
// and only add the properties we want to use
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/utils/package.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { dirname } from 'path'

import { Options, PackageJson, readPackageUp } from 'read-pkg-up'
import { Options, PackageJson, readPackageUp } from 'read-package-up'

type PackageResult = {
packageJson: PackageJson
Expand Down
2 changes: 1 addition & 1 deletion packages/framework-info/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"p-filter": "^3.0.0",
"p-locate": "^6.0.0",
"process": "^0.11.10",
"read-pkg-up": "^9.0.0",
"read-package-up": "^11.0.0",
"semver": "^7.3.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/framework-info/src/context.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cwd, version as nodejsVersion } from 'process'

import { locatePath } from 'locate-path'
import { PackageJson, readPackageUp } from 'read-pkg-up'
import { PackageJson, readPackageUp } from 'read-package-up'

interface PackageJsonInfo {
packageJson?: PackageJson
Expand Down
2 changes: 1 addition & 1 deletion packages/framework-info/src/core.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pFilter from 'p-filter'
import type { PackageJson } from 'read-pkg-up'
import type { PackageJson } from 'read-package-up'

import type { Context, PathExists } from './context.js'
import { usesFramework } from './detect.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/framework-info/src/package.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { includeKeys } from 'filter-obj'
import isPlainObj from 'is-plain-obj'
import type { PackageJson } from 'read-pkg-up'
import type { PackageJson } from 'read-package-up'

export const getPackageJsonContent = function (packageJson: PackageJson | undefined) {
if (packageJson === undefined) {
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-sdk-setup/src/sdk-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { setMultiSpanAttributes } from '@netlify/opentelemetry-utils'
import { DiagLogLevel, TraceFlags, context, diag, trace } from '@opentelemetry/api'
import { Resource } from '@opentelemetry/resources'
import { SEMRESATTRS_SERVICE_NAME, SEMRESATTRS_SERVICE_VERSION } from '@opentelemetry/semantic-conventions'
import type { PackageJson } from 'read-pkg-up'
import type { PackageJson } from 'read-package-up'

import { getDiagLogger, loadBaggageFromFile } from './util.js'

Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-sdk-setup/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createWriteStream } from 'node:fs'
import { realpath, readFile } from 'node:fs/promises'
import { readFile, realpath } from 'node:fs/promises'

import { diag, DiagLogger } from '@opentelemetry/api'
import { parseKeyPairsIntoRecord } from '@opentelemetry/core/build/src/baggage/utils.js'
import { readPackageUp, PackageJson } from 'read-pkg-up'
import { PackageJson, readPackageUp } from 'read-package-up'

/**
* Builds a function for logging data to a provided fileDescriptor (i.e. hidden from
Expand Down

0 comments on commit d32e5bd

Please sign in to comment.