зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1796143 - Allow esmify to fix sjs files. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D159708
This commit is contained in:
Родитель
6bb105cf69
Коммит
997539e60c
|
@ -199,21 +199,12 @@ class HgUtils(VCSUtils):
|
|||
def find_all_jss(self, path):
|
||||
jss = []
|
||||
|
||||
cmd = ["hg", "files", f'set:glob:"{path}/**/*.jsm"']
|
||||
for line in self.run(cmd):
|
||||
js = pathlib.Path(line)
|
||||
if is_excluded_from_imports(js):
|
||||
continue
|
||||
jss.append(js)
|
||||
|
||||
cmd = ["hg", "files", f'set:glob:"{path}/**/*.js"']
|
||||
for line in self.run(cmd):
|
||||
js = pathlib.Path(line)
|
||||
if is_excluded_from_imports(js):
|
||||
continue
|
||||
jss.append(js)
|
||||
|
||||
cmd = ["hg", "files", f'set:glob:"{path}/**/*.sys.mjs"']
|
||||
cmd = [
|
||||
"hg",
|
||||
"files",
|
||||
f'set:glob:"{path}/**/*.jsm" or glob:"{path}/**/*.js" or '
|
||||
+ f'glob:"{path}/**/*.mjs" or glob:"{path}/**/*.sjs"',
|
||||
]
|
||||
for line in self.run(cmd):
|
||||
js = pathlib.Path(line)
|
||||
if is_excluded_from_imports(js):
|
||||
|
@ -261,21 +252,14 @@ class GitUtils(VCSUtils):
|
|||
def find_all_jss(self, path):
|
||||
jss = []
|
||||
|
||||
cmd = ["git", "ls-files", f"{path}/*.jsm"]
|
||||
for line in self.run(cmd):
|
||||
js = pathlib.Path(line)
|
||||
if is_excluded_from_imports(js):
|
||||
continue
|
||||
jss.append(js)
|
||||
|
||||
cmd = ["git", "ls-files", f"{path}/*.js"]
|
||||
for line in self.run(cmd):
|
||||
js = pathlib.Path(line)
|
||||
if is_excluded_from_imports(js):
|
||||
continue
|
||||
jss.append(js)
|
||||
|
||||
cmd = ["git", "ls-files", f"{path}/*.mjs"]
|
||||
cmd = [
|
||||
"git",
|
||||
"ls-files",
|
||||
f"{path}/*.jsm",
|
||||
f"{path}/*.js",
|
||||
f"{path}/*.mjs",
|
||||
f"{path}/*.sjs",
|
||||
]
|
||||
for line in self.run(cmd):
|
||||
js = pathlib.Path(line)
|
||||
if is_excluded_from_imports(js):
|
||||
|
|
Загрузка…
Ссылка в новой задаче