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

tpm

Package Overview
Dependencies
Maintainers
1
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.0.10 to 1.0.11

bin/PngOptimizerCL.exe

2

package.json
{
"name": "tpm",
"version": "1.0.10",
"version": "1.0.11",
"description": "Static Package Manager",

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

@@ -60,4 +60,6 @@

pathList.forEach(function(path) {
var cmd = (process.platform === 'win32' ? 'set' : 'export') + ' LANG=en_US && svn info "' + path.replace(/\\/g, '\\\\') + '"';
var cmd = 'svn info "' + path.replace(/\\/g, '\\\\') + '" --xml';
console.log(cmd);
var cp = ChildProcess.exec(cmd);

@@ -68,3 +70,3 @@

var match;
if ((match = /^Last Changed Rev:\s*(\d+)$/im.exec(data))) {
if ((match = /<commit\s+revision="(\d+)">/i.exec(data))) {
var value = match[1];

@@ -124,8 +126,2 @@ }

var version = data[path];
var buildPath = addVersion(getBuildPath(path), version);
var distPath = addVersion(getDistPath(path), version);
Util.copyFile(path, buildPath);
Util.copyFile(path, distPath);
return prefix + addVersion(url, version) + suffix;

@@ -136,2 +132,25 @@ }

});
_.each(data, function(version, path) {
var buildPath = addVersion(getBuildPath(path), version);
var distPath = addVersion(getDistPath(path), version);
if (!Fs.existsSync(buildPath) || Util.mtime(path) >= Util.mtime(buildPath)) {
Util.copyFile(path, buildPath);
}
if (!Fs.existsSync(distPath) || Util.mtime(path) >= Util.mtime(distPath)) {
Util.copyFile(path, distPath);
// 在Windows下优化PNG
if (process.platform === 'win32') {
var cmd = '"' + Path.resolve(__dirname + '/../bin/PngOptimizerCL').replace(/\\/g, '\\\\') + '" -file:"' + distPath.replace(/\\/g, '\\\\') + '"';
console.log(cmd);
var cp = ChildProcess.exec(cmd);
}
}
});
callback(content);

@@ -138,0 +157,0 @@ });

@@ -28,3 +28,3 @@

paths.forEach(function(path) {
var cmd = (process.platform === 'win32' ? 'set' : 'export') + ' LANG=en_US && svn info "' + path.replace(/\\/g, '\\\\') + '"';
var cmd = 'svn info "' + path.replace(/\\/g, '\\\\') + '" --xml';

@@ -37,6 +37,6 @@ var cp = ChildProcess.exec(cmd);

var line = '';
if ((match = /^URL:\s*(.+)$/im.exec(data))) {
if ((match = /<url>(.+?)<\/url>/i.exec(data))) {
line += match[1];
}
if ((match = /^Last Changed Rev:\s*(\d+)$/im.exec(data))) {
if ((match = /<commit\s+revision="(\d+)">/i.exec(data))) {
line += ' ' + match[1];

@@ -43,0 +43,0 @@ }

var Path = require('path');
var Fs = require('fs');
var util = require('util');
var Iconv = require('iconv-lite');

@@ -107,2 +108,7 @@ var UglifyJs = require('uglify-js');

function mtime(filePath) {
var stat = Fs.statSync(filePath);
return stat.mtime.getTime();
}
function copyFile(fromPath, toPath) {

@@ -297,2 +303,3 @@ console.log('Copy file: ' + fromPath);

exports.writeFileSync = writeFileSync;
exports.mtime = mtime;
exports.copyFile = copyFile;

@@ -299,0 +306,0 @@ exports.minJs = minJs;

Sorry, the diff of this file is not supported yet

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