@after-work.js/transform
Advanced tools
Comparing version 5.0.0-beta.5 to 5.0.0-beta.6
{ | ||
"name": "@after-work.js/transform", | ||
"version": "5.0.0-beta.5", | ||
"version": "5.0.0-beta.6", | ||
"publishConfig": { | ||
@@ -23,3 +23,3 @@ "access": "public" | ||
"dependencies": { | ||
"@after-work.js/utils": "^5.0.0-beta.5", | ||
"@after-work.js/utils": "^5.0.0-beta.6", | ||
"find-cache-dir": "2.0.0", | ||
@@ -31,3 +31,3 @@ "import-cwd": "2.1.0" | ||
], | ||
"gitHead": "e4f056c0e733b343e224487816b88b7f5c0f8648" | ||
"gitHead": "e227b3265e2ae2b0dd71eb4e4669880b2bb9f843" | ||
} |
@@ -41,6 +41,7 @@ /* eslint class-methods-use-this: 0, no-restricted-syntax: 0, guard-for-in: 0, no-await-in-loop: 0, max-len: 0 */ | ||
} = options; | ||
transformItem.hash = this.getCacheHash(filename, { ...babelOptions, ...instrument, ...transform }); // eslint-disable-line no-param-reassign | ||
if (!virtualMock) { | ||
transformItem.mtime = +fs.statSync(filename).mtime; // eslint-disable-line no-param-reassign | ||
transformItem.hash = this.getCacheHash(filename, { ...babelOptions, ...instrument, ...transform }); | ||
if (virtualMock) { | ||
return; | ||
} | ||
transformItem.mtime = +fs.statSync(filename).mtime; | ||
this.transform.set(filename, transformItem); | ||
@@ -96,3 +97,3 @@ this.safeSaveCacheSync(filename); | ||
} catch (err) { | ||
console.log(err); // eslint-disable-line no-console | ||
console.log(err); | ||
} | ||
@@ -99,0 +100,0 @@ } |
@@ -9,3 +9,3 @@ /* eslint global-require: 0, import/no-dynamic-require: 0, object-curly-newline: 0, class-methods-use-this: 0, max-len: 0 */ | ||
function getBabelOpts(filename, argv) { | ||
const { options: { sourceRoot, only, ignore }, babelPluginIstanbul } = argv.babel; | ||
const { options: { sourceRoot, only, ignore } = {}, babelPluginIstanbul } = argv.babel; | ||
const addCoverage = argv.instrument.testExclude.shouldInstrument(filename); | ||
@@ -34,3 +34,3 @@ const plugins = addCoverage | ||
const res = typescript.transpileModule(tsContent, transpileOpts); | ||
tsContent = res.outputText; // eslint-disable-line no-param-reassign | ||
tsContent = res.outputText; | ||
let tsBabelOpts = { | ||
@@ -53,3 +53,3 @@ sourceMaps: 'both', | ||
if (!content) { | ||
filename = ensureFilePath(filename); // eslint-disable-line no-param-reassign | ||
filename = ensureFilePath(filename); | ||
const cachedTransform = fileCache.getSync(filename, argv); | ||
@@ -59,3 +59,3 @@ if (cachedTransform) { | ||
} | ||
content = fs.readFileSync(filename, 'utf8'); // eslint-disable-line no-param-reassign | ||
content = fs.readFileSync(filename, 'utf8'); | ||
} | ||
@@ -68,4 +68,4 @@ const cachedTransform = fileCache.getSync(filename, argv); | ||
if (isTypescript(filename)) { | ||
const { tsContent, tsBabelOpts } = transformTypescript(filename, babelOpts.sourceRoot, content, argv); // eslint-disable-line | ||
content = tsContent; // eslint-disable-line no-param-reassign | ||
const { tsContent, tsBabelOpts } = transformTypescript(filename, babelOpts.sourceRoot, content, argv); | ||
content = tsContent; | ||
babelOpts = Object.assign({}, babelOpts, tsBabelOpts); | ||
@@ -72,0 +72,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
169
7594