Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1289

Remove path-exists from dependencies and replace it with fs.existsSync

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/react-observatory/patch-1 into master Dec 18, 2016
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 6

Created by: halfzebra

Why

path-exists was originally created to support the semantics of deprecated fs.exists which is used to check if given path exists in the file system asynchronously.

Because fs.exists() is being deprecated, but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.

In Create React App all of the uses of path-exists are synchronuous.

The original fs.existsSync is not deprecated, which makes path-exists obsolete for synchronuous checks.

Note that fs.exists() is deprecated, but fs.existsSync() is not. (The callback parameter to fs.exists() accepts parameters that are inconsistent with other Node.js callbacks. fs.existsSync() does not use a callback.)

What

This PR removes path-exists from Create React App and replaces all the uses of pathExists.sync with fs.existsSync 🙂

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/react-observatory/patch-1