Skip to content

Commit 34ee93a

Browse files
committed
Rename the package to react-file-progress
npm refused react-file-upload-progress: too similar to the existing react-fileupload-progress, which differs only by a hyphen. Neither `npm view` nor `npm publish --dry-run` catches that rule — only the real registry does, so it surfaced at the last step. react-file-progress was free in every punctuation variant, so nothing collides. It also describes the package better than the old name did: there are two bars here, and only one of them is an upload. The scoped fallback npm suggested was rejected — a scoped name ranks worse in npm search, which undoes the discoverability work. Repo renamed to match; GitHub redirects the old URL but raw.githubusercontent does not, so the README's GIF links are rewritten. Style element id and the console warning prefix follow the package name too.
1 parent c0b13fa commit 34ee93a

10 files changed

Lines changed: 29 additions & 28 deletions

File tree

‎README.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# react-file-upload-progress
1+
# react-file-progress
22

33
> **React file upload component with two progress bars** — one for reading the
44
> file from the user's hard disk or SSD into the browser, and a separate one for
55
> uploading it to your server. Drag and drop, TypeScript, zero dependencies.
66
7-
[![NPM](https://img.shields.io/npm/v/react-file-upload-progress.svg)](https://www.npmjs.com/package/react-file-upload-progress) [![License](https://img.shields.io/npm/l/react-file-upload-progress.svg)](https://www.npmjs.com/package/react-file-upload-progress)
7+
[![NPM](https://img.shields.io/npm/v/react-file-progress.svg)](https://www.npmjs.com/package/react-file-progress) [![License](https://img.shields.io/npm/l/react-file-progress.svg)](https://www.npmjs.com/package/react-file-progress)
88

9-
**[▶ Try the live demo](https://codeaesthetic.github.io/react-file-upload-progress/)**
9+
**[▶ Try the live demo](https://codeaesthetic.github.io/react-file-progress/)**
1010

1111
## What is a "file loading" progress bar?
1212

@@ -20,7 +20,7 @@ frozen screen while it happened.
2020
into the browser.** No server, no network, no upload. Just "your file is being
2121
loaded, here's how far along it is".
2222

23-
<img src="https://raw.githubusercontent.com/codeAesthetic/react-file-upload-progress/main/assets/load.gif" alt="Progress bar showing a file being read from the hard disk into the browser, then sitting ready with its name shown" width="520" />
23+
<img src="https://raw.githubusercontent.com/codeAesthetic/react-file-progress/main/assets/load.gif" alt="Progress bar showing a file being read from the hard disk into the browser, then sitting ready with its name shown" width="520" />
2424

2525
> **The GIF above is slowed down on purpose so you can see the bar move.**
2626
> On a fast local SSD, reading a 150MB file into the browser takes only about
@@ -39,7 +39,7 @@ that you trigger yourself** — with its own, second progress bar.
3939
## Install
4040

4141
```bash
42-
npm install --save react-file-upload-progress
42+
npm install --save react-file-progress
4343
```
4444

4545
React 16.8 or newer is required (it is a peer dependency).
@@ -65,7 +65,7 @@ only show you the second one.
6565
Just load files into the browser. No server involved:
6666

6767
```tsx
68-
import { FileUpload } from 'react-file-upload-progress'
68+
import { FileUpload } from 'react-file-progress'
6969

7070
<FileUpload
7171
accept='image/*'
@@ -80,7 +80,7 @@ Add a `url` and each ready file gets an Upload button:
8080
<FileUpload url='/api/upload' onUploadComplete={(item) => console.log(item.response)} />
8181
```
8282

83-
<img src="https://raw.githubusercontent.com/codeAesthetic/react-file-upload-progress/main/assets/upload.gif" alt="Pressing Upload sends the already-loaded file to the server with its own progress bar" width="520" />
83+
<img src="https://raw.githubusercontent.com/codeAesthetic/react-file-progress/main/assets/upload.gif" alt="Pressing Upload sends the already-loaded file to the server with its own progress bar" width="520" />
8484

8585
Or skip the wait and upload as soon as each file lands:
8686

@@ -130,7 +130,7 @@ Rejected files appear in the same list as errors, so there's only one thing to r
130130
| `Item` | `item`, `upload()`, `cancel()`, `retry()`, `remove()`, `canUpload` |
131131
| `ProgressBar` | `value`, `status`, plus everything above |
132132

133-
<img src="https://raw.githubusercontent.com/codeAesthetic/react-file-upload-progress/main/assets/custom.gif" alt="The same uploader rendered with a custom card and a gradient progress bar" width="520" />
133+
<img src="https://raw.githubusercontent.com/codeAesthetic/react-file-progress/main/assets/custom.gif" alt="The same uploader rendered with a custom card and a gradient progress bar" width="520" />
134134

135135
**CSS** — class names are stable and unhashed (`rfu-root`, `rfu-item`, `rfu-progress`…), bars carry `data-status`, and colors are custom properties:
136136

@@ -209,7 +209,7 @@ npm run verify # generated-file check, lint, typecheck, tests, build
209209
cd example && npm install && npm run dev
210210
```
211211

212-
The example is the [live demo](https://codeaesthetic.github.io/react-file-upload-progress/),
212+
The example is the [live demo](https://codeaesthetic.github.io/react-file-progress/),
213213
and `npm run deploy` publishes it to GitHub Pages. Running it locally is worth
214214
it: the dev server has a deliberately throttled upload endpoint built in, so
215215
the bars move at a watchable speed instead of finishing instantly.

‎example/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
name="description"
99
content="React file upload with real progress for both the disk read and the server upload"
1010
/>
11-
<title>react-file-upload-progress</title>
11+
<title>react-file-progress</title>
1212
</head>
1313
<body>
1414
<div id="root"></div>

‎example/package-lock.json‎

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎example/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react-file-upload-progress-example",
2+
"name": "react-file-progress-example",
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0",
15-
"react-file-upload-progress": "file:.."
15+
"react-file-progress": "file:.."
1616
},
1717
"devDependencies": {
1818
"@types/node": "^20.11.0",

‎example/src/App.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import {
55
FileUpload,
66
ProgressBar,
77
formatBytes
8-
} from 'react-file-upload-progress'
8+
} from 'react-file-progress'
99
import type {
1010
FileItemProps,
1111
ProgressBarProps,
1212
UseFileUploadResult
13-
} from 'react-file-upload-progress'
13+
} from 'react-file-progress'
1414
// Note: no stylesheet import. The components inject their own styles.
1515

1616
// The dev server has a deliberately throttled upload endpoint (see
@@ -285,7 +285,7 @@ const App = () => {
285285
return (
286286
<main className='page'>
287287
<header>
288-
<h1>react-file-upload-progress</h1>
288+
<h1>react-file-progress</h1>
289289
<p className='sub'>
290290
A progress bar for getting a file <em>into the browser</em> — and
291291
another for sending it to a server, only when you say so.

‎example/vite.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ export default defineConfig({
8686
},
8787
optimizeDeps: {
8888
// Always read the freshly built dist/ rather than a prebundled copy.
89-
exclude: ['react-file-upload-progress']
89+
exclude: ['react-file-progress']
9090
}
9191
})

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "react-file-upload-progress",
2+
"name": "react-file-progress",
33
"version": "0.1.0",
44
"description": "React progress bar for reading a file from the hard disk/SSD into the browser, plus a separate one for uploading it to your server when you choose. Drop zone, swappable components, zero dependencies, TypeScript types",
55
"author": "https://github.com/codeAesthetic",
66
"license": "MIT",
77
"repository": {
88
"type": "git",
9-
"url": "git+https://github.com/codeAesthetic/react-file-upload-progress.git"
9+
"url": "git+https://github.com/codeAesthetic/react-file-progress.git"
1010
},
11-
"homepage": "https://github.com/codeAesthetic/react-file-upload-progress#readme",
11+
"homepage": "https://github.com/codeAesthetic/react-file-progress#readme",
1212
"bugs": {
13-
"url": "https://github.com/codeAesthetic/react-file-upload-progress/issues"
13+
"url": "https://github.com/codeAesthetic/react-file-progress/issues"
1414
},
1515
"sideEffects": [
1616
"*.css"

‎src/hooks/useFileUpload.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function useFileUpload(
8787
if (!url) {
8888
// eslint-disable-next-line no-console
8989
console.warn(
90-
'[react-file-upload-progress] Cannot upload without a `url`. ' +
90+
'[react-file-progress] Cannot upload without a `url`. ' +
9191
'The file is loaded and available as item.data.'
9292
)
9393
return

‎src/injectStyles.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { styles } from './styles'
22

3-
const STYLE_ID = 'react-file-upload-progress-styles'
3+
const STYLE_ID = 'react-file-progress-styles'
44

55
let injected = false
66

0 commit comments

Comments
 (0)