!6 修复无效的参数类型错误

From: @wu-leilei 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
This commit is contained in:
openeuler-ci-bot 2023-02-10 09:29:26 +00:00 committed by Gitee
commit a44493a293
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@
%global enable_tests 1 %global enable_tests 1
Name: nodejs-source-map-support Name: nodejs-source-map-support
Version: 0.4.18 Version: 0.4.18
Release: 2 Release: 3
Summary: Fixes stack traces for files with source maps Summary: Fixes stack traces for files with source maps
License: MIT License: MIT
URL: https://github.com/evanw/node-source-map-support URL: https://github.com/evanw/node-source-map-support
@ -48,6 +48,9 @@ NODE_ENV=test %{_bindir}/mocha -R spec
%{nodejs_sitelib}/%{packagename} %{nodejs_sitelib}/%{packagename}
%changelog %changelog
* Fri Feb 10 2023 wulei <wulei80@h-partners.com> - 0.4.18-3
- Fix error invalid data type
* Tue Dec 29 2020 Ge Wang <wangge20@huawei.com> - 0.4.18-2 * Tue Dec 29 2020 Ge Wang <wangge20@huawei.com> - 0.4.18-2
- Fix compile failure due to nodejs update to 10.21.0 - Fix compile failure due to nodejs update to 10.21.0

View File

@ -85,7 +85,7 @@ function createMultiLineSourceMapWithSourcesContent() {
function compareStackTrace(sourceMap, source, expected) { function compareStackTrace(sourceMap, source, expected) {
// Check once with a separate source map // Check once with a separate source map
fs.writeFileSync('.generated.js.map', sourceMap); fs.writeFileSync('.generated.js.map', sourceMap.toString());
fs.writeFileSync('.generated.js', 'exports.test = function() {' + fs.writeFileSync('.generated.js', 'exports.test = function() {' +
source.join('\n') + '};//@ sourceMappingURL=.generated.js.map'); source.join('\n') + '};//@ sourceMappingURL=.generated.js.map');
try { try {
@ -112,7 +112,7 @@ function compareStackTrace(sourceMap, source, expected) {
function compareStdout(done, sourceMap, source, expected) { function compareStdout(done, sourceMap, source, expected) {
fs.writeFileSync('.original.js', 'this is the original code'); fs.writeFileSync('.original.js', 'this is the original code');
fs.writeFileSync('.generated.js.map', sourceMap); fs.writeFileSync('.generated.js.map', sourceMap.toString());
fs.writeFileSync('.generated.js', source.join('\n') + fs.writeFileSync('.generated.js', source.join('\n') +
'//@ sourceMappingURL=.generated.js.map'); '//@ sourceMappingURL=.generated.js.map');
child_process.exec('node ./.generated', function(error, stdout, stderr) { child_process.exec('node ./.generated', function(error, stdout, stderr) {
@ -590,7 +590,7 @@ it('handleUncaughtExceptions is true with existing listener', function(done) {
]; ];
fs.writeFileSync('.original.js', 'this is the original code'); fs.writeFileSync('.original.js', 'this is the original code');
fs.writeFileSync('.generated.js.map', createSingleLineSourceMap()); fs.writeFileSync('.generated.js.map', createSingleLineSourceMap().toString());
fs.writeFileSync('.generated.js', source.join('\n')); fs.writeFileSync('.generated.js', source.join('\n'));
child_process.exec('node ./.generated', function(error, stdout, stderr) { child_process.exec('node ./.generated', function(error, stdout, stderr) {