Skip to content

Commit cb3edb1

Browse files
committed
Remove v3.0.9 from future bundles published to NPM.
1 parent f53097f commit cb3edb1

File tree

1 file changed

+3
-38
lines changed

1 file changed

+3
-38
lines changed

Gruntfile.js

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ module.exports = (grunt) => {
387387
files: ['tests/flow-headless-browser.html'],
388388
options: {
389389
puppeteer: {
390-
headless: "new",
390+
headless: 'new',
391391
args: ['--no-sandbox', '--disable-setuid-sandbox'],
392392
},
393393
},
@@ -750,15 +750,12 @@ module.exports = (grunt) => {
750750
verbose: 1, // See the output of each hook.
751751
// verbose: 2, // Only for debugging.
752752
hooks: {
753-
'before:init': ['grunt clean', 'grunt v309:add'],
753+
'before:init': ['grunt clean'],
754754
'after:bump': ['grunt', 'echo Adding build/ folder...', 'git add -f build/'],
755755
'after:npm:release': [],
756756
'after:git:release': [],
757757
'after:github:release': [],
758-
'after:release': [
759-
'grunt v309:remove',
760-
'echo Successfully released ${name} ${version} to https://github.com/${repo.repository}',
761-
],
758+
'after:release': ['echo Successfully released ${name} ${version} to https://github.com/${repo.repository}'],
762759
},
763760
git: {
764761
commitMessage: 'Release VexFlow ${version}',
@@ -827,38 +824,6 @@ module.exports = (grunt) => {
827824
done();
828825
});
829826
});
830-
831-
// VexFlow examples on JSFiddle and other websites broke because VexFlow 4 removed these URLs:
832-
// https://unpkg.com/vexflow/releases/vexflow-debug.js
833-
// https://unpkg.com/vexflow/releases/vexflow-min.js
834-
// This command restores version 3.0.9 to those locations, but adds a console.warn(...) to the JS file to alert developers
835-
// that a new version has been released.
836-
//
837-
// Use this command during the release script to publish version 3.0.9 to npm alongside version 4.x.
838-
// grunt v309:add
839-
// grunt v309:remove
840-
grunt.registerTask('v309', 'Include the legacy version when publishing to npm.', function (command) {
841-
const minifiedFile = 'releases/vexflow-min.js';
842-
const debugFile = 'releases/vexflow-debug.js';
843-
844-
if (command === 'add') {
845-
// Commit ID 00ec15c67ff333ea49f4d3defbd9e22374c03684 is version 3.0.9.
846-
const commitID = '00ec15c67ff333ea49f4d3defbd9e22374c03684';
847-
runCommand('git', 'checkout', commitID, minifiedFile);
848-
runCommand('git', 'checkout', commitID, debugFile);
849-
850-
const message =
851-
'\nconsole.warn("Please upgrade to the newest release of VexFlow.\\n' +
852-
'See: https://github.com/0xfe/vexflow for more information.\\nThis page uses version 3.0.9, which is no longer supported.");\n\n' +
853-
'// YOU ARE LOOKING AT VEXFLOW LEGACY VERSION 3.0.9.\n' +
854-
'// SEE THE `build/` FOLDER FOR THE NEWEST RELEASE.\n';
855-
fs.appendFileSync(minifiedFile, message);
856-
fs.appendFileSync(debugFile, message);
857-
} else {
858-
runCommand('git', 'rm', '-f', minifiedFile);
859-
runCommand('git', 'rm', '-f', debugFile);
860-
}
861-
});
862827
};
863828

864829
// Call tsc programmatically:

0 commit comments

Comments
 (0)