From f1cada5954018316a1638750a7bc6b51395e6e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9lemy=20Laurans?= Date: Wed, 11 Apr 2018 22:55:47 +0200 Subject: [PATCH] Remove exists-sync dependency --- lib/calculate-version.js | 4 ++-- lib/utilities/extend-from-application-entity.js | 4 ++-- package.json | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/calculate-version.js b/lib/calculate-version.js index db2eb446447..f3d937c3c9b 100644 --- a/lib/calculate-version.js +++ b/lib/calculate-version.js @@ -1,5 +1,5 @@ var path = require('path'); -var existsSync = require('exists-sync'); +var fs = require('fs'); var gitRepoInfo = require('git-repo-info'); var npmGitInfo = require('npm-git-info'); @@ -9,7 +9,7 @@ module.exports = function() { var packageVersion = package.version; var suffix = ''; - if (existsSync(gitPath)) { + if (fs.existsSync(gitPath)) { var info = gitRepoInfo(gitPath); if (info.tag) { return info.tag.replace(/^v/, ''); diff --git a/lib/utilities/extend-from-application-entity.js b/lib/utilities/extend-from-application-entity.js index 437a38818b4..cd958854cb7 100644 --- a/lib/utilities/extend-from-application-entity.js +++ b/lib/utilities/extend-from-application-entity.js @@ -1,7 +1,7 @@ var stringUtil = require('ember-cli-string-utils'); var SilentError = require('silent-error'); var pathUtil = require('ember-cli-path-utils'); -var existsSync = require('exists-sync'); +var fs = require('fs'); var path = require('path'); module.exports = function(type, baseClass, options) { @@ -15,7 +15,7 @@ module.exports = function(type, baseClass, options) { var entityDirectory = type + 's'; var applicationEntityPath = path.join(options.project.root, 'app', entityDirectory, 'application.js'); - var hasApplicationEntity = existsSync(applicationEntityPath); + var hasApplicationEntity = fs.existsSync(applicationEntityPath); if (!isAddon && !options.baseClass && entityName !== 'application' && hasApplicationEntity) { options.baseClass = 'application'; } diff --git a/package.json b/package.json index 2a156b52e6e..4a352fc86ed 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "ember-cli-version-checker": "^2.1.0", "ember-inflector": "^2.0.0", "ember-runtime-enumerable-includes-polyfill": "^2.0.0", - "exists-sync": "0.0.3", "git-repo-info": "^1.1.2", "heimdalljs": "^0.3.0", "inflection": "^1.8.0",