mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
chore(build): Remove buildDeps task
This commit is contained in:
75
package-lock.json
generated
75
package-lock.json
generated
@@ -30,7 +30,6 @@
|
||||
"eslint-plugin-jsdoc": "^46.2.6",
|
||||
"glob": "^10.3.4",
|
||||
"google-closure-compiler": "^20230802.0.0",
|
||||
"google-closure-deps": "^20230502.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-gzip": "^1.4.2",
|
||||
@@ -5919,47 +5918,6 @@
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/google-closure-deps": {
|
||||
"version": "20230502.0.0",
|
||||
"resolved": "https://registry.npmjs.org/google-closure-deps/-/google-closure-deps-20230502.0.0.tgz",
|
||||
"integrity": "sha512-d74eiwhPn5E9Uq9wZ8qYvO2FRGf/anI6q/Z2JsyNbsQG7lWw9xq+F0gwKSdnPOwR1MODOD2Pe3mnjD+I5Qntcg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"minimatch": "^3.0.4",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"closure-make-deps": "bin/closuremakedeps.js",
|
||||
"get-js-version": "bin/getjsversion.js"
|
||||
}
|
||||
},
|
||||
"node_modules/google-closure-deps/node_modules/yargs": {
|
||||
"version": "16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
|
||||
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cliui": "^7.0.2",
|
||||
"escalade": "^3.1.1",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"require-directory": "^2.1.1",
|
||||
"string-width": "^4.2.0",
|
||||
"y18n": "^5.0.5",
|
||||
"yargs-parser": "^20.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/google-closure-deps/node_modules/yargs-parser": {
|
||||
"version": "20.2.9",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
|
||||
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/got": {
|
||||
"version": "11.8.6",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
|
||||
@@ -17258,39 +17216,6 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"google-closure-deps": {
|
||||
"version": "20230502.0.0",
|
||||
"resolved": "https://registry.npmjs.org/google-closure-deps/-/google-closure-deps-20230502.0.0.tgz",
|
||||
"integrity": "sha512-d74eiwhPn5E9Uq9wZ8qYvO2FRGf/anI6q/Z2JsyNbsQG7lWw9xq+F0gwKSdnPOwR1MODOD2Pe3mnjD+I5Qntcg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimatch": "^3.0.4",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"yargs": {
|
||||
"version": "16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
|
||||
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cliui": "^7.0.2",
|
||||
"escalade": "^3.1.1",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"require-directory": "^2.1.1",
|
||||
"string-width": "^4.2.0",
|
||||
"y18n": "^5.0.5",
|
||||
"yargs-parser": "^20.2.2"
|
||||
}
|
||||
},
|
||||
"yargs-parser": {
|
||||
"version": "20.2.9",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
|
||||
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"got": {
|
||||
"version": "11.8.6",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
|
||||
|
||||
@@ -83,7 +83,6 @@
|
||||
"eslint-plugin-jsdoc": "^46.2.6",
|
||||
"glob": "^10.3.4",
|
||||
"google-closure-compiler": "^20230802.0.0",
|
||||
"google-closure-deps": "^20230502.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-gzip": "^1.4.2",
|
||||
|
||||
@@ -44,11 +44,6 @@ const PYTHON = process.platform === 'win32' ? 'python' : 'python3';
|
||||
*/
|
||||
const COMPILED_SUFFIX = '_compressed';
|
||||
|
||||
/**
|
||||
* Dependencies file (used by buildCompiled for chunking.
|
||||
*/
|
||||
const DEPS_FILE = path.join(BUILD_DIR, 'deps.js');
|
||||
|
||||
/**
|
||||
* Name of an object to be used as a shared "global" namespace by
|
||||
* chunks generated by the Closure Compiler with the
|
||||
@@ -315,82 +310,6 @@ function buildJavaScript(done) {
|
||||
done();
|
||||
}
|
||||
|
||||
/**
|
||||
* This task updates DEPS_FILE (deps.js), used by
|
||||
* closure-calculate-chunks when determining how to organise .js
|
||||
* source files into chunks.
|
||||
*
|
||||
* Prerequisite: buildJavaScript.
|
||||
*/
|
||||
function buildDeps() {
|
||||
const roots = [
|
||||
TSC_OUTPUT_DIR,
|
||||
];
|
||||
|
||||
/** Maximum buffer size, in bytes for child process stdout/stderr. */
|
||||
const MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
||||
|
||||
/**
|
||||
* Filter a string to extract lines containing (or not containing) the
|
||||
* specified target string.
|
||||
*
|
||||
* @param {string} text Text to filter.
|
||||
* @param {string} target String to search for.
|
||||
* @param {boolean?} exclude If true, extract only non-matching lines.
|
||||
* @returns {string} Filtered text.
|
||||
*/
|
||||
function filter(text, target, exclude) {
|
||||
return text.split('\n')
|
||||
.filter((line) => Boolean(line.match(target)) !== Boolean(exclude))
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* Log unexpected diagnostics, after removing expected warnings.
|
||||
*
|
||||
* @param {string} text Standard error output from closure-make-deps
|
||||
*/
|
||||
function log(text) {
|
||||
for (const line of text.split('\n')) {
|
||||
if (line &&
|
||||
!/^WARNING .*: Bounded generic semantics are currently/.test(line) &&
|
||||
!/^WARNING .*: Missing type declaration/.test(line) &&
|
||||
!/^WARNING .*: illegal use of unknown JSDoc tag/.test(line)) {
|
||||
console.error(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const args = '--closure-path ./build/src ' +
|
||||
roots.map(root => `--root '${root}' `).join('');
|
||||
exec(
|
||||
`closure-make-deps ${args}`, {maxBuffer: MAX_BUFFER_SIZE},
|
||||
(error, stdout, stderr) => {
|
||||
if (error) {
|
||||
// Remove warnings from stack trace to show only errors.
|
||||
error.stack = filter(error.stack, /^WARNING/, true);
|
||||
// Due to some race condition, the stderr parameter is
|
||||
// often badly truncated if an error is non-null, so the
|
||||
// error message might not actually be shown to the user.
|
||||
// Print a helpful message to the user to help them find
|
||||
// out what the problem is.
|
||||
error.stack += `
|
||||
|
||||
If you do not see an helpful diagnostic from closure-make-deps in the
|
||||
error message above, try running:
|
||||
|
||||
npx closure-make-deps ${args} 2>&1 |grep -v WARNING`;
|
||||
reject(error);
|
||||
} else {
|
||||
log(stderr);
|
||||
fs.writeFileSync(DEPS_FILE, stdout);
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* This task regenerates msg/json/en.js and msg/json/qqq.js from
|
||||
* msg/messages.js.
|
||||
|
||||
Reference in New Issue
Block a user