Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tpm

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tpm - npm Package Compare versions

Comparing version 1.2.6 to 1.2.8

8

changelog.txt

@@ -7,2 +7,10 @@ #######################################################################

ver 1.2.8
* Bugfix:修复1.2.7版本BUG,command里的路径需要加双引号。
ver 1.2.7
* 改善:check命令,文件不存在时跳过检查。
* Bugfix: 并行SVN命令可能出错。
* Bugfix:在分支上构建图片没有版本号。
ver 1.2.6

@@ -9,0 +17,0 @@ * Bugfix:排除tpl文件。

2

package.json
{
"name": "tpm",
"version": "1.2.6",
"version": "1.2.8",
"description": "Static Package Manager",

@@ -5,0 +5,0 @@ "author": "Longhao Luo <lhluo@tudou.com>",

@@ -145,3 +145,4 @@ var Path = require('path');

} else if (url.charAt(0) == '/') {
path = Path.resolve(config.root + '/../' + url);
url = url.replace(/^\/[^\/]+/, '');
path = Path.resolve(config.root + url);
}

@@ -219,4 +220,3 @@ path = getSrcPath(path);

Util.minJs(buildPath, distPath);
Util.setSvnKeywords(buildPath);
Util.setSvnKeywords(distPath);
Util.setSvnKeywords([buildPath, distPath]);
return;

@@ -247,4 +247,3 @@ }

Util.minJs(buildPath, distPath);
Util.setSvnKeywords(buildPath);
Util.setSvnKeywords(distPath);
Util.setSvnKeywords([buildPath, distPath]);
}

@@ -274,4 +273,3 @@

Util.minCss(buildPath, distPath);
Util.setSvnKeywords(buildPath);
Util.setSvnKeywords(distPath);
Util.setSvnKeywords([buildPath, distPath]);
});

@@ -278,0 +276,0 @@ });

@@ -31,2 +31,6 @@

if (!Fs.existsSync(filePath)) {
return;
}
var globalIdList = /^(module|page|lazy)\/mobile\//.test(relativePath) ? mobileGlobal : global;

@@ -33,0 +37,0 @@

@@ -11,5 +11,5 @@

var DIFF_USAGE = 'Usage: tpm list [REVISION]\n\n' +
var DIFF_USAGE = 'Usage: ytpm list [REVISION]\n\n' +
'Examples:\n' +
'tpm list 28464\n';
'ytpm list 28464\n';

@@ -16,0 +16,0 @@ // Open new mail window and insert file list

@@ -49,3 +49,2 @@

dirPath = Path.resolve(dirPath);
return path.indexOf(dirPath) == 0;

@@ -186,8 +185,36 @@ }

function execSvn(cmd, stdoutFn, stderrFn, closeFn) {
info('svn ' + cmd);
var command = '';
if (process.platform === 'win32') {
command = 'set LANG=en_US & ';
} else {
command = 'export LANG=en_US; ';
}
command += 'svn ' + cmd;
var cp = ChildProcess.exec(command);
cp.stdout.on('data', function(stdout) {
stdoutFn && stdoutFn(stdout);
});
cp.stderr.on('data', function(stderr){
error('[SVN] ' + stderr);
stderrFn && stderrFn(stderr);
});
cp.on('close', function() {
closeFn && closeFn();
});
}
function setSvnKeywords(path) {
var cmd = 'svn propset svn:keywords "Rev LastChangedDate Author URL" "' + path.replace(/\\/g, '\\\\') + '"';
if(!Array.isArray(path)){
path = [path];
}
console.log(cmd);
path = path.map(function(p) {
return '"' + p.replace(/\\/g, '\\\\') + '"';
});
ChildProcess.exec(cmd);
execSvn(['propset', 'svn:keywords', '"Rev LastChangedDate Author URL"'].concat(path).join(' '), function(data) {
info(data);
});
}

@@ -200,6 +227,13 @@

var child = ChildProcess.spawn('svn', ['add'].concat(path));
child.stdout.on('data', function(data){
console.log('svn add:\n' + data);
if (path.length < 1) {
return;
}
path = path.map(function(p) {
return '"' + p.replace(/\\/g, '\\\\') + '"';
});
execSvn(['add'].concat(path).join(' '), function(data) {
info(data);
});
}

@@ -206,0 +240,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc