Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"@box/types": "^2.1.8",
"@box/unified-share-modal": "^2.15.16",
"@box/user-selector": "^1.77.13",
"@box/uploads-manager": "^1.15.0",
"@box/uploads-manager": "^1.17.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the validity of `@box/uploads-manager` version and look for breaking changes

echo "Fetching available versions of `@box/uploads-manager` from npm..."
npm view `@box/uploads-manager` versions --json | jq -r '.[]' | grep -E '^1\.(15|16|17)\.' | tail -20

echo -e "\nChecking if version 1.17.2 exists..."
npm view `@box/uploads-manager`@1.17.2 version 2>/dev/null && echo "✓ Version 1.17.2 exists" || echo "✗ Version 1.17.2 not found"

echo -e "\nFetching recent changelog/release notes..."
npm view `@box/uploads-manager`@1.17.2 --json | jq -r '.description, .homepage'

Repository: box/box-ui-elements

Length of output: 149


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Check whether 1.17.2 exists (lightweight npm view)..."
npm view `@box/uploads-manager`@1.17.2 version || true

echo
echo "2) Fetch minimal metadata for 1.17.2 (homepage/repository if available)..."
npm view `@box/uploads-manager`@1.17.2 --json | head -c 4000 || true

echo
echo "3) Look for resolved versions in lockfiles..."
ls -1 package-lock.json yarn.lock pnpm-lock.yaml 2>/dev/null || true
rg -n "\"`@box/uploads-manager`\"" package-lock.json yarn.lock pnpm-lock.yaml 2>/dev/null || true
rg -n "`@box/uploads-manager`@1\.(15|16|17)\." package-lock.json yarn.lock pnpm-lock.yaml 2>/dev/null || true

Repository: box/box-ui-elements

Length of output: 149


🌐 Web query:

@box/uploads-manager 1.17.2 release notes changelog migration

💡 Result:

There is no publicly available release version 1.17.2 for the package @box/uploads-manager as of June 12, 2026. Official Box documentation and repositories, such as the box/box-ui-elements repository, do not contain release notes or a changelog for this specific version. The @box/uploads-manager package is primarily a component used within Box UI Elements [1]. If you are looking for information regarding Box SDK migrations, Box has transitioned its primary development efforts toward generated SDKs (sdk-gen) [2]. Migration guides for Box SDKs, such as moving from the legacy box-node-sdk to the generated sdk-gen module, are available in the official box-node-sdk repository [3][2]. For specific updates related to your project's dependencies, it is recommended to: 1. Check the official npm registry page for @box/uploads-manager to verify the latest published version. 2. Review the box/box-ui-elements GitHub repository for any unreleased changes or open pull requests that might match your version number. 3. Consult the official Box Developer documentation at https://developer.box.com/ for the most current integration and migration guidance.

Citations:


🌐 Web query:

site:github.com "@box/uploads-manager" releases 1.17.2

💡 Result:

There is no publicly available npm package named @box/uploads-manager, nor is there a record of a release version 1.17.2 associated with such a package [1][2]. The UploadsManager is a component internal to the Box UI Elements library, which is maintained in the box/box-ui-elements repository on GitHub [1][3]. This component is used within the Content Uploader UI element [1][4], but it is not distributed as a standalone npm package [2]. If you are looking for specific versions of Box-related tools, you may be referring to a different package, as versioning schemes vary across Box's various SDKs and UI libraries (e.g., box-ui-elements or box-node-sdk) [5][6].

Citations:


🌐 Web query:

"uploads-manager" "CHANGELOG" "1.17"

💡 Result:

The term "uploads-manager" (or similar variations) appears in multiple software projects, but version 1.17 is specifically associated with the Uploadcare File Uploader project [1][2]. According to the official CHANGELOG.md for the uploadcare/file-uploader repository, version 1.17.0 was released on June 16, 2025, followed by versions 1.17.1 and 1.17.2 on June 18, 2025 [1][2]. These releases primarily focused on various bug fixes [1][2]. While the term "uploads-manager" or "upload manager" is used in other contexts—such as within the source code of the Perplexica project [3], Elementor (where an uploads-manager.php file exists) [4], and various other software systems [5][6][7][8]—there is no widely recognized or standardized project strictly named "uploads-manager" that maintains a unified changelog for version 1.17 outside of the specific context of the Uploadcare File Uploader or project-specific internal components [1][2]. If you are looking for information regarding a different specific software product, please provide the name of the organization or repository.

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Lockfiles present:"
ls -1 package-lock.json yarn.lock pnpm-lock.yaml pnpm-lock.yml 2>/dev/null || true

echo
echo "Searching for `@box/uploads-manager` in lockfiles..."
rg -n "`@box/uploads-manager`" package-lock.json yarn.lock pnpm-lock.yaml pnpm-lock.yml 2>/dev/null || true

echo
echo "Searching for a resolved version number for `@box/uploads-manager`..."
rg -n "`@box/uploads-manager`@|\"`@box/uploads-manager`\":\\s*\\{\"|\"`@box/uploads-manager`\"\\s*:\\s*\\{" package-lock.json yarn.lock pnpm-lock.yaml pnpm-lock.yml 2>/dev/null || true

echo
echo "Searching for scope registry config (.npmrc) for `@box`..."
ls -1 .npmrc 2>/dev/null || true
[ -f .npmrc ] && sed -n '1,200p' .npmrc || true

echo
echo "Repo-wide search for `@box/uploads-manager`..."
rg -n "`@box/uploads-manager`" . 2>/dev/null | head -n 50 || true

Repository: box/box-ui-elements

Length of output: 2034


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Get the exact resolved tarball URL from yarn.lock
url="$(awk '
  $0 ~ /^"`@box`\/uploads-manager@\^1\.17\.2":/ {inblk=1; next}
  inblk && $0 ~ /^\s*resolved "/ {
    sub(/^[[:space:]]*resolved "/,""); sub(/"$/,""); print; exit
  }
' yarn.lock)"

echo "Resolved tarball URL from yarn.lock:"
echo "$url"

echo
echo "Downloading tarball to /tmp..."
rm -f /tmp/uploads-manager-1.17.2.tgz
curl -L --fail --silent --show-error -o /tmp/uploads-manager-1.17.2.tgz "$url"

echo "Inspecting tarball contents (top level)..."
mkdir -p /tmp/uploads-manager-1.17.2
rm -rf /tmp/uploads-manager-1.17.2/*
tar -xzf /tmp/uploads-manager-1.17.2.tgz -C /tmp/uploads-manager-1.17.2 --strip-components=1 --wildcards 'package.json' 'README*' 'CHANGELOG*' 'changelog*' 'MIGRATION*' 'migration*' 2>/dev/null || true

echo
echo "Top docs present:"
ls -la /tmp/uploads-manager-1.17.2 || true

echo
echo "package.json:"
cat /tmp/uploads-manager-1.17.2/package.json || true

echo
echo "Any changelog/migration text (first 200 lines each):"
for f in /tmp/uploads-manager-1.17.2/CHANGELOG* /tmp/uploads-manager-1.17.2/changelog* /tmp/uploads-manager-1.17.2/MIGRATION* /tmp/uploads-manager-1.17.2/migration*; do
  [ -e "$f" ] || continue
  echo "---- $f ----"
  sed -n '1,200p' "$f" || true
done

Repository: box/box-ui-elements

Length of output: 583


🏁 Script executed:

#!/bin/bash
set -euo pipefail

tgz="/tmp/uploads-manager-1.17.2.tgz"

echo "tgz file stats:"
ls -la "$tgz" || true
echo
echo "tgz file type:"
file "$tgz" || true
echo
echo "First bytes (to detect HTML/errors):"
head -c 200 "$tgz" | xxd -p || true
echo
echo "Archive listing (first 50 entries):"
tar -tzf "$tgz" | head -n 50 || true

Repository: box/box-ui-elements

Length of output: 2225


🏁 Script executed:

#!/bin/bash
set -euo pipefail

tgz="/tmp/uploads-manager-1.17.2.tgz"
out="/tmp/uploads-manager-1.17.2"

rm -rf "$out"
mkdir -p "$out"

echo "Extracting without stripping to inspect paths..."
tar -xzf "$tgz" -C "$out" || true

echo
echo "Top-level extracted dirs/files:"
ls -la "$out" || true

echo
echo "Searching for package.json in extracted tree..."
find "$out" -maxdepth 4 -name package.json -print || true

echo
echo "Searching for CHANGELOG/MIGRATION in extracted tree (maxdepth 6)..."
find "$out" -maxdepth 6 -iname "change*log*" -o -iname "migration*" -print || true

Repository: box/box-ui-elements

Length of output: 477


🏁 Script executed:

#!/bin/bash
set -euo pipefail

out="/tmp/uploads-manager-1.17.2"

echo "package/package.json (first 120 lines):"
sed -n '1,120p' "$out/package/package.json"

echo
echo "Package version field(s):"
node -e "const p=require('$out/package/package.json'); console.log({version:p.version, name:p.name});" 2>/dev/null || true

echo
echo "Search for changelog/migration files in tarball contents:"
find "$out" -maxdepth 6 -iname "change*log*" -o -iname "*migration*" -print || true

echo
echo "Search for 'breaking' notes in common doc files (best-effort):"
find "$out" -maxdepth 6 -type f \( -iname "*readme*" -o -iname "*changelog*" -o -iname "*migration*" -o -iname "*.md" \) -print | head -n 50 || true

for f in $(find "$out" -maxdepth 6 -type f \( -iname "*readme*" -o -iname "*changelog*" -o -iname "*migration*" -o -iname "*.md" \) -print 2>/dev/null | head -n 20); do
  echo "---- $f (breaking snippets) ----"
  rg -n -i "breaking|migrat|upgrade|deprecat" "$f" | head -n 20 || true
done

Repository: box/box-ui-elements

Length of output: 1844


🏁 Script executed:

#!/bin/bash
set -euo pipefail

out="/tmp/uploads-manager-1.17.2/package"

echo "README.md (first 200 lines):"
sed -n '1,200p' "$out/README.md" || true

echo
echo "README.md (lines matching breaking/migrat/upgrade/deprecat):"
rg -n -i "breaking|migrat|upgrade|deprecat" "$out/README.md" || true

echo
echo "Any markdown/text docs besides README.md (up to depth 6):"
find "$out" -maxdepth 6 -type f \( -iname "*.md" -o -iname "*readme*" \) -print || true

echo
echo "Search all extracted files for breaking/migrat/upgrade/deprecat (best-effort):"
rg -n -i "breaking|migrat|upgrade|deprecat" "$out" || true

Repository: box/box-ui-elements

Length of output: 9104


Check @box/uploads-manager 1.17.2 bump risk

  • @box/uploads-manager is already resolved to 1.17.2 in yarn.lock, and the downloaded 1.17.2 tarball’s package/package.json reports version: "1.17.2".
  • The 1.17.2 package ships no CHANGELOG/MIGRATION files (README documents the API only), so breaking/migration guidance isn’t available from release notes.
  • Validate breaking API/type changes in this repo’s usage of UploadItemStatus, UploadItem, and UploadsManager and run the relevant content-uploader tests before merging.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 150, Verify that bumping `@box/uploads-manager` to 1.17.2
doesn’t introduce breaking API/type changes by auditing uses of
UploadItemStatus, UploadItem, and UploadsManager in the repo: search for
references to those symbols, update any call sites or type annotations to match
the new package typings if they changed, and run the content-uploader test suite
(unit and integration) to catch runtime/type regressions; if tests fail, pin the
dependency back or apply necessary code changes to adapt to the new API.

"@cfaester/enzyme-adapter-react-18": "^0.8.0",
"@chromatic-com/storybook": "^4.0.1",
"@commitlint/cli": "^19.8.0",
Expand Down Expand Up @@ -314,7 +314,7 @@
"@box/types": "^2.1.8",
"@box/unified-share-modal": "^2.15.16",
"@box/user-selector": "^1.77.13",
"@box/uploads-manager": "^1.15.0",
"@box/uploads-manager": "^1.17.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you also have to update the peerDependencies of @box/uploads-manager package, ex. blueprint-web, blueprint-web-assets, and item-icon

"@hapi/address": "^2.1.4",
"@tanstack/react-virtual": "^3.13.12",
"axios": "^0.32.0",
Expand Down
6 changes: 3 additions & 3 deletions src/api/uploads/PlainUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ class PlainUpload extends BaseUpload {
if (this.fileId) {
uploadUrl = uploadUrl.replace('content', `${this.fileId}/content`);
}
}

if (this.fields) {
uploadUrl = updateQueryParameters(uploadUrl, { fields: this.fields.toString() });
}
if (this.fields) {
uploadUrl = updateQueryParameters(uploadUrl, { fields: this.fields.toString() });
}

const attributes = JSON.stringify({
Expand Down
21 changes: 21 additions & 0 deletions src/api/uploads/__tests__/PlainUpload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,27 @@ describe('api/uploads/PlainUpload', () => {
});
});

test('should append fields query parameter to upload URL when fields are provided', () => {
upload.isDestroyed = jest.fn().mockReturnValueOnce(false);
upload.computeSHA1 = jest.fn().mockReturnValueOnce(Promise.resolve('somehash'));
upload.file = {
name: 'warlock',
};
upload.folderId = '123';
upload.fields = ['content_created_at', 'version_number'];
upload.xhr = {
uploadFile: jest.fn(),
};

return upload.preflightSuccessHandler({ data: {} }).then(() => {
expect(upload.xhr.uploadFile).toHaveBeenCalledWith(
expect.objectContaining({
url: `${upload.uploadHost}/api/2.0/files/content?fields=content_created_at%2Cversion_number`,
}),
);
});
});

test('should upload with no Content-MD5 hash if hashing fails', () => {
upload.isDestroyed = jest.fn().mockReturnValueOnce(false);
upload.computeSHA1 = jest.fn().mockReturnValueOnce(Promise.resolve(''));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('mapToModernizedUploadItem()', () => {
status: 'uploading',
isFolder: undefined,
errorMessage: undefined,
versionNumber: undefined,
});
});

Expand Down Expand Up @@ -63,6 +64,22 @@ describe('mapToModernizedUploadItem()', () => {
expect(result.extension).toBe('');
expect(result.progress).toBe(0);
});

test('forwards versionNumber from item.boxFile.version_number', () => {
const result = mapToModernizedUploadItem(
buildLegacyItem({
status: STATUS_COMPLETE,
boxFile: { version_number: '2' },
}),
'0',
);
expect(result.versionNumber).toBe('2');
});

test('leaves versionNumber undefined when boxFile is missing', () => {
const result = mapToModernizedUploadItem(buildLegacyItem({ status: STATUS_IN_PROGRESS }), '0');
expect(result.versionNumber).toBeUndefined();
});
});

describe('mapToModernizedUploadItems()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function mapToModernizedUploadItem(item: LegacyUploadItem | FolderUploadI
status: STATUS_MAP[item.status] ?? 'pending',
isFolder: item.isFolder,
errorMessage,
versionNumber: item.boxFile?.version_number,
};
}

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1242,10 +1242,10 @@
resolved "https://registry.yarnpkg.com/@box/unified-share-modal/-/unified-share-modal-2.15.16.tgz#49deb182bf1ac7f1ffe4bae713ab12ff2822533e"
integrity sha512-Y1bE+JWDQm058lT+AcsfwJqK3WvGAsZj6ro9PLvejJZ1LxzexvOzyQFkM0sL4Kmj/93k2VEKoAJ/onBgheAJoQ==

"@box/uploads-manager@^1.15.0":
version "1.15.0"
resolved "https://registry.yarnpkg.com/@box/uploads-manager/-/uploads-manager-1.15.0.tgz#59e68734bb2dd0c84b356e3270f7d41e964dcbc9"
integrity sha512-pvz8wsZbhfoDK6tPfYl3Yo+48++C9Rcx6NxNVQxeq0dTGCjQeP4z0nLPvEaAGOUDI6osyF31pKSTDhwBSQsM7g==
"@box/uploads-manager@^1.17.2":
version "1.17.2"
resolved "https://registry.yarnpkg.com/@box/uploads-manager/-/uploads-manager-1.17.2.tgz#e7640ca60c0b1eac6fda1ab6dc5d8269a124eb69"
integrity sha512-pVXoPDFmAYx/ErD8+kP3yi4/EOG331tWl4yiO7cEDE1ia5X6mmKGp3va5twJfiqmTmnxBJJZAFEBa4QYb5yV5Q==

"@box/user-selector@^1.77.13":
version "1.77.13"
Expand Down
Loading