Skip to content

Commit

Permalink
Remove ability to import /promise types and throw when required.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveukx committed Aug 11, 2022
1 parent 7fe88a3 commit 2ac1d3f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 90 deletions.
6 changes: 0 additions & 6 deletions simple-git/package.json
Expand Up @@ -47,9 +47,6 @@
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./promise": {
"require": "./promise.js"
}
},
"types": "./typings/index.d.ts",
Expand All @@ -74,9 +71,6 @@
"types": "./dist/typings/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./promise": {
"require": "./promise.js"
}
}
}
Expand Down
69 changes: 0 additions & 69 deletions simple-git/promise.d.ts

This file was deleted.

20 changes: 5 additions & 15 deletions simple-git/promise.js
@@ -1,18 +1,8 @@
// TODO: deprecation warning
console.warn(`=============================================
throw new Error(`=============================================
simple-git has supported promises / async await since version 2.6.0.
Importing from 'simple-git/promise' has been deprecated and will be
removed by July 2022.
Importing from 'simple-git/promise' was deprecated in January 2022
and removed in August 2022.
To upgrade, change all 'simple-git/promise' imports to just 'simple-git'
Upgrading is simple though:
change all 'simple-git/promise' imports to just 'simple-git'
=============================================`);

const simpleGit = require('.');

module.exports = Object.assign(
function () {
return simpleGit.gitP.apply(null, arguments);
},
simpleGit,
{ default: simpleGit.gitP }
);

0 comments on commit 2ac1d3f

Please sign in to comment.