react-dropzone / file-selector

Convert a DragEvent or file input to a list of File objects
MIT License
95 stars 33 forks source link

Please update package.json for v0.1.x seriese as well #38

Closed woswos2018 closed 4 years ago

woswos2018 commented 4 years ago

Do you want to request a feature or report a bug?

What is the current behavior?

Some projects refer to file-selector by specifying semver like ^0.1.12 (e.g. https://github.com/react-dropzone/react-dropzone/blob/master/package.json). v0.1.16 is missing required dist folder.

  1. Add file-selector to package.json
    $ cat package.json
    {
        "dependencies": {
            "file-selector": "^0.1.12"
        }
    }
  2. npm install
  3. 0.1.16 is installed and dist is missing.
    $ cat package-lock.json
    {
        "requires": true,
        "lockfileVersion": 1,
        "dependencies": {
            "file-selector": {
                "version": "0.1.16",
                "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.16.tgz",
                "integrity": "sha512-QM6Y0UlCv8AhMu6sNfrd5CkGlGx0qBtmN+J2Z71ymgiQF4PO3gFrw8phaloNZJA0XGtlXAvpFaSBy4g0vdsPnQ==",
                "requires": {
                    "tslib": "^2.0.1"
                }
            },
            "tslib": {
                "version": "2.0.3",
                "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
                "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
            }
        }
    }
    $ ls node_modules/file-selector/ -A
    LICENSE  README.md  package.json

The same fixes done on 0.2.x (https://github.com/react-dropzone/file-selector/commit/9b57a1224e2946529348cd2099e6c1928ed1b0f8#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519, https://github.com/react-dropzone/file-selector/commit/9b3bbb124d7adfeb9f29b9c6c0eb35353fe420f0) would be required for these clients.

What is the expected behavior?

Required folders should be included.

$ ls -A node_modules/file-selector/
CHANGELOG.md  README.md  dist  package.json  src
rolandjitsu commented 4 years ago

Please update to v0.2.2.

zafarn8 commented 4 years ago

From today morning my jenkins build is getting failed and showing below error message. I dont understand why its getting failed. till yesterday its worked properly. Is there any change in react-dropzone..!! I am using "react-dropzone": "^8.2.0" version.

`Creating an optimized production build... Failed to compile.

./node_modules/react-dropzone/dist/es/index.js Cannot find module: 'file-selector'. Make sure this package is installed.

You can install this package by running: npm install file-selector.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! seasofNail@0.1.0 build: react-scripts build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the seasofNail@0.1.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.  npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-10-23T09_58_52_623Z-debug.log The command '/bin/sh -c npm run build' returned a non-zero code: 1 [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE`

rolandjitsu commented 4 years ago

This should have been fixed with the v0.1.17 release. Please try it and let me know.

zafarn8 commented 4 years ago

Yesterday I have upgraded my "react-dropzone": "^8.2.0" version to "10.2.1" and its build successfully. But still I have not understand why build was failing and giving the above error for version "8.2.0".

rolandjitsu commented 4 years ago

Yesterday I have upgraded my "react-dropzone": "^8.2.0" version to "10.2.1" and its build successfully. But still I have not understand why build was failing and giving the above error for version "8.2.0".

The file-selector lib was published with missing files. Should be fixed now.

zafarn8 commented 4 years ago

okay, thanks a ton.

rolandjitsu commented 4 years ago

This should be ok now, so gonna close it.