Skip to content

Commit

Permalink
chore: remove import-from (element-plus#3503)
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun authored Sep 19, 2021
1 parent ac30cd0 commit 2322103
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
9 changes: 6 additions & 3 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// eslint-disable-next-line
const importFrom = require('import-from')
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path')
const { createRequire } = require('module')

function getPackages(context) {
return Promise.resolve()
.then(() => {
const ctx = context || {}
const cwd = ctx.cwd || process.cwd()
const Project = importFrom(cwd, '@lerna/project')
const Project = createRequire(path.resolve(cwd, 'noop.js'))(
'@lerna/project'
)
const project = new Project(cwd)
return project.getPackages()
})
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
"gulp": "^4.0.2",
"gulp-typescript": "^6.0.0-alpha.1",
"husky": "^7.0.2",
"import-from": "^3.0.0",
"jest": "^26.6.3",
"lerna": "^3.22.1",
"lint-staged": "^11.1.2",
Expand Down
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7471,13 +7471,6 @@ import-fresh@^3.1.0:
parent-module "^1.0.0"
resolve-from "^4.0.0"

import-from@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966"
integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==
dependencies:
resolve-from "^5.0.0"

import-local@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
Expand Down

0 comments on commit 2322103

Please sign in to comment.