diff --git a/CVE-2020-7729-pre.patch b/CVE-2020-7729-pre.patch deleted file mode 100644 index f4a2755152770668427c960c8db59e87303c50d3..0000000000000000000000000000000000000000 --- a/CVE-2020-7729-pre.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 3484b83a87e1f5ea689aa5aece9f9ae96151d3ff Mon Sep 17 00:00:00 2001 -From: Kyle Robinson Young -Date: Wed, 13 Apr 2016 18:06:59 -0700 -Subject: [PATCH] Fix for readYAML error messages - ---- - lib/grunt/file.js | 2 +- - test/grunt/file_test.js | 8 +++++++- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/lib/grunt/file.js b/lib/grunt/file.js -index 303e0ab4..f8a694e5 100644 ---- a/lib/grunt/file.js -+++ b/lib/grunt/file.js -@@ -262,7 +262,7 @@ file.readYAML = function(filepath, options) { - return result; - } catch (e) { - grunt.verbose.error(); -- throw grunt.util.error('Unable to parse "' + filepath + '" file (' + e.problem + ').', e); -+ throw grunt.util.error('Unable to parse "' + filepath + '" file (' + e.message + ').', e); - } - }; - -diff --git a/test/grunt/file_test.js b/test/grunt/file_test.js -index 91466f28..19889e61 100644 ---- a/test/grunt/file_test.js -+++ b/test/grunt/file_test.js -@@ -452,7 +452,7 @@ exports.file = { - test.done(); - }, - 'readYAML': function(test) { -- test.expect(3); -+ test.expect(4); - var obj; - obj = grunt.file.readYAML('test/fixtures/utf8.yaml'); - test.deepEqual(obj, this.object, 'file should be read as utf8 by default and parsed correctly.'); -@@ -460,6 +460,12 @@ exports.file = { - obj = grunt.file.readYAML('test/fixtures/iso-8859-1.yaml', {encoding: 'iso-8859-1'}); - test.deepEqual(obj, this.object, 'file should be read using the specified encoding.'); - -+ test.throws(function() { -+ obj = grunt.file.readYAML('test/fixtures/error.yaml'); -+ }, function(err) { -+ return err.message.indexOf('undefined') === -1; -+ }, 'error thrown should not contain undefined.'); -+ - grunt.file.defaultEncoding = 'iso-8859-1'; - obj = grunt.file.readYAML('test/fixtures/iso-8859-1.yaml'); - test.deepEqual(obj, this.object, 'changing the default encoding should work.'); diff --git a/CVE-2020-7729.patch b/CVE-2020-7729.patch deleted file mode 100644 index a6e32f3c8e2c638acfbab35fecdb44c0833712b0..0000000000000000000000000000000000000000 --- a/CVE-2020-7729.patch +++ /dev/null @@ -1,64 +0,0 @@ -From e350cea1724eb3476464561a380fb6a64e61e4e7 Mon Sep 17 00:00:00 2001 -From: Vlad Filippov -Date: Mon, 17 Aug 2020 11:28:59 -0400 -Subject: [PATCH] Switch to use `safeLoad` for loading YML files via - `file.readYAML`. - -For previous behaviour please use the following: - -``` -readYAML('test/fixtures/utf8.yaml', null, {unsafeLoad: true}); -``` ---- - lib/grunt/file.js | 13 +++++++++++-- - test/grunt/file_test.js | 7 +++++-- - 2 files changed, 16 insertions(+), 4 deletions(-) - -diff --git a/lib/grunt/file.js b/lib/grunt/file.js -index eefeddb2..7e0e2fb7 100644 ---- a/lib/grunt/file.js -+++ b/lib/grunt/file.js -@@ -241,12 +241,21 @@ file.readJSON = function(filepath, options) { - }; - - // Read a YAML file, parse its contents, return an object. --file.readYAML = function(filepath, options) { -+file.readYAML = function(filepath, options, yamlOptions) { -+ if (!options) { options = {}; } -+ if (!yamlOptions) { yamlOptions = {}; } -+ - var src = file.read(filepath, options); - var result; - grunt.verbose.write('Parsing ' + filepath + '...'); - try { -- result = YAML.load(src); -+ // use the recommended way of reading YAML files -+ // https://github.com/nodeca/js-yaml#safeload-string---options- -+ if (yamlOptions.unsafeLoad) { -+ result = YAML.load(src); -+ } else { -+ result = YAML.safeLoad(src); -+ } - grunt.verbose.ok(); - return result; - } catch (e) { -diff --git a/test/grunt/file_test.js b/test/grunt/file_test.js -index e833fb2d..b192cad9 100644 ---- a/test/grunt/file_test.js -+++ b/test/grunt/file_test.js -@@ -452,10 +452,13 @@ exports.file = { - test.done(); - }, - 'readYAML': function(test) { -- test.expect(4); -+ test.expect(5); - var obj; - obj = grunt.file.readYAML('test/fixtures/utf8.yaml'); -- test.deepEqual(obj, this.object, 'file should be read as utf8 by default and parsed correctly.'); -+ test.deepEqual(obj, this.object, 'file should be safely read as utf8 by default and parsed correctly.'); -+ -+ obj = grunt.file.readYAML('test/fixtures/utf8.yaml', null, {unsafeLoad: true}); -+ test.deepEqual(obj, this.object, 'file should be unsafely read as utf8 by default and parsed correctly.'); - - obj = grunt.file.readYAML('test/fixtures/iso-8859-1.yaml', {encoding: 'iso-8859-1'}); - test.deepEqual(obj, this.object, 'file should be read using the specified encoding.'); diff --git a/CVE-2022-0436.patch b/CVE-2022-0436.patch deleted file mode 100644 index 95d2c784844c2cb80e0923453d839590720fc7ca..0000000000000000000000000000000000000000 --- a/CVE-2022-0436.patch +++ /dev/null @@ -1,84 +0,0 @@ -From aad3d4521c3098fb255fb2db8f2e1d691a033665 Mon Sep 17 00:00:00 2001 -From: Vlad Filippov -Date: Sun, 10 Apr 2022 23:16:06 -0400 -Subject: [PATCH] Update dependencies, tests... - - -diff --git a/lib/grunt/file.js b/lib/grunt/file.js -index 863617f..f0a2d6e 100644 ---- a/lib/grunt/file.js -+++ b/lib/grunt/file.js -@@ -303,8 +303,11 @@ file.write = function(filepath, contents, options) { - // Read a file, optionally processing its content, then write the output. - // Or read a directory, recursively creating directories, reading files, - // processing content, writing output. -+// Handles symlinks by coping them as files or directories. - file.copy = function copy(srcpath, destpath, options) { -- if (file.isDir(srcpath)) { -+ if (file._isSymbolicLink(srcpath)) { -+ file._copySymbolicLink(srcpath, destpath); -+ } else if (file.isDir(srcpath)) { - // Copy a directory, recursively. - // Explicitly create new dest directory. - file.mkdir(destpath); -@@ -452,6 +455,24 @@ file.isPathCwd = function() { - } - }; - -+file._isSymbolicLink = function() { -+ var filepath = path.join.apply(path, arguments); -+ return fs.lstatSync(filepath).isSymbolicLink(); -+}; -+ -+file._copySymbolicLink = function(srcpath, destpath) { -+ var destdir = path.join(destpath, '..'); -+ var fileBase = path.basename(srcpath); -+ // Use the correct relative path for the symlink -+ if (!grunt.file.isPathAbsolute(srcpath)) { -+ srcpath = path.relative(destdir, srcpath) || '.'; -+ } -+ file.mkdir(destdir); -+ var mode = grunt.file.isDir(srcpath) ? 'dir' : 'file'; -+ var destpath = path.join(destpath, fileBase); -+ return fs.symlinkSync(srcpath, destpath, mode); -+}; -+ - // Test to see if a filepath is contained within the CWD. - file.isPathInCwd = function() { - var filepath = path.join.apply(path, arguments); -diff --git a/test/grunt/file_test.js b/test/grunt/file_test.js -index 5110f04..41f1c2d 100644 ---- a/test/grunt/file_test.js -+++ b/test/grunt/file_test.js -@@ -888,5 +888,28 @@ exports.file = { - test.ok(grunt.file.isPathInCwd(path.resolve('deep')), 'subdirectory is in cwd'); - test.done(); - }, -+ 'symbolicLinkCopy': function(test) { -+ test.expect(4); -+ var srcfile = new Tempdir(); -+ fs.symlinkSync(path.resolve('test/fixtures/octocat.png'), path.join(srcfile.path, 'octocat.png'), 'file'); -+ // test symlink copy for files -+ var destdir = new Tempdir(); -+ grunt.file.copy(path.join(srcfile.path, 'octocat.png'), destdir.path); -+ test.ok(fs.lstatSync(path.join(srcfile.path, 'octocat.png')).isSymbolicLink()); -+ test.ok(fs.lstatSync(path.join(destdir.path, 'octocat.png')).isSymbolicLink()); -+ -+ // test symlink copy for directories -+ var srcdir = new Tempdir(); -+ var destdir = new Tempdir(); -+ var fixtures = path.resolve('test/fixtures'); -+ var symlinkSource = path.join(srcdir.path, path.basename(fixtures)); -+ console.log('symlinkSource', symlinkSource); -+ fs.symlinkSync(fixtures, symlinkSource, 'dir'); -+ -+ grunt.file.copy(symlinkSource, destdir.path); -+ test.ok(fs.lstatSync(symlinkSource).isSymbolicLink()); -+ test.ok(fs.lstatSync(path.join(destdir.path, path.basename(fixtures))).isSymbolicLink()); -+ test.done(); -+ }, - } - }; --- -2.27.0 - diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 9f4969432d4c20f31e027e832bb130cfb59bee6c..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# nodejs-grunt - -#### Description -Grunt is a JavaScript library used for automation and running tasks - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index 6fc645c54352930c2b0117ea1b42164030fb8b7b..1bf67687a47a1081d2229666ba42c09b6b9bd148 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,3 @@ -# nodejs-grunt +Deprecated since Aug 2025 -#### 介绍 -Grunt is a JavaScript library used for automation and running tasks - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +- https://gitee.com/openeuler/release-management/pulls/2363 diff --git a/grunt-1.0.1.tar.gz b/grunt-1.0.1.tar.gz deleted file mode 100644 index 7be074d4d3a27e23cc262c64b724dda8a247a49f..0000000000000000000000000000000000000000 Binary files a/grunt-1.0.1.tar.gz and /dev/null differ diff --git a/nodejs-grunt.spec b/nodejs-grunt.spec deleted file mode 100644 index c102652df5127fb9310c7d5a3eaca2e9e332aa15..0000000000000000000000000000000000000000 --- a/nodejs-grunt.spec +++ /dev/null @@ -1,79 +0,0 @@ -%global enable_tests 1 -Name: nodejs-grunt -Version: 1.0.1 -Release: 6 -Summary: Grunt is a JavaScript library used for automation and running tasks -License: MIT -URL: https://github.com/gruntjs/grunt -Source0: https://github.com/gruntjs/grunt/archive/v%{version}/grunt-%{version}.tar.gz -Patch0: CVE-2020-7729-pre.patch -Patch1: CVE-2020-7729.patch -# https://github.com/gruntjs/grunt/commit/aad3d45 -Patch2: CVE-2022-0436.patch -BuildArch: noarch -ExclusiveArch: %{nodejs_arches} noarch -BuildRequires: nodejs-packaging -%if 0%{?enable_tests} -BuildRequires: npm(coffee-script) npm(dateformat) npm(eventemitter2) npm(exit) -BuildRequires: npm(findup-sync) npm(glob) npm(grunt-cli) npm(grunt-known-options) -BuildRequires: npm(grunt-legacy-log) npm(grunt-legacy-util) npm(iconv-lite) npm(js-yaml) -BuildRequires: npm(minimatch) npm(nopt) npm(path-is-absolute) npm(rimraf) npm(difflet) -BuildRequires: npm(grunt-contrib-nodeunit) npm(semver) npm(shelljs) -BuildRequires: npm(temporary) npm(through2) -%endif -%description -Grunt is the JavaScript task runner. Why use a task runner? In one word: -automation. The less work you have to do when performing repetitive tasks -like minification, compilation, unit testing, linting, etc, the easier -your job becomes. After you've configured it, a task runner can do most -of that mundane work for you with basically zero effort. - -%prep -%autosetup -n grunt-%{version} -p1 -%nodejs_fixdep coffee-script '^1.3' -%nodejs_fixdep dateformat '*' -%nodejs_fixdep eventemitter2 '^6.4.5' -%nodejs_fixdep findup-sync '~0.3' -%nodejs_fixdep glob '~6.0.3' -%nodejs_fixdep minimatch '^3.0.0' -%nodejs_fixdep nopt '^3.0.6' -%nodejs_fixdep rimraf '^2.0' -%nodejs_fixdep js-yaml '^3.5.0' - -%build - -%install -mkdir -p %{buildroot}%{nodejs_sitelib}/grunt -cp -pr package.json internal-tasks/ lib/ \ - %{buildroot}%{nodejs_sitelib}/grunt -%nodejs_symlink_deps -%if 0%{?enable_tests} - -%check -%nodejs_symlink_deps --check -grunt nodeunit:all -%endif - -%files -%doc AUTHORS CHANGELOG CONTRIBUTING.md README.md -%license LICENSE -%{nodejs_sitelib}/grunt - -%changelog -* Sat Sep 02 2023 Ge Wang - 1.0.1-6 -- Modify minimatch version to fix install problem - -* Fri Jul 01 2022 baizhonggui - 1.0.1-5 -- Modify eventemitter version to 6.4.5 to compat latest eventemitter - -* Mon May 09 2022 wangkai - 1.0.1-4 -- Remove BuildRequires npm(grunt-contrib-watch) - -* Thu Apr 21 2022 wangkai - 1.0.1-3 -- Fix CVE-2022-0436 - -* Wed Feb 23 2022 yaoxin - 1.0.1-2 -- Fix CVE-2020-7729 - -* Thu Aug 20 2020 Anan Fu - 1.0.1-1 -- package init diff --git a/nodejs-grunt.yaml b/nodejs-grunt.yaml deleted file mode 100644 index 5a179749da075305327580d3b385b4d4d82eeccc..0000000000000000000000000000000000000000 --- a/nodejs-grunt.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version_control: github -src_repo: gruntjs/grunt -tag_prefix: "^v" -seperator: "."