awesome-typescript-loader
Advanced tools
Comparing version 3.2.0-rc.0 to 3.2.0
@@ -5,2 +5,14 @@ # Change Log | ||
<a name="3.2.0"></a> | ||
# [3.2.0](https://github.com/s-panferov/awesome-typescript-loader/compare/v3.2.0-rc.0...v3.2.0) (2017-06-28) | ||
### Bug Fixes | ||
* **paths-plugin:** properly skip .d.ts files ([f14eaab](https://github.com/s-panferov/awesome-typescript-loader/commit/f14eaab)) | ||
* don't kill the loader when compilation.bail = true ([#448](https://github.com/s-panferov/awesome-typescript-loader/issues/448)) ([3d8f91a](https://github.com/s-panferov/awesome-typescript-loader/commit/3d8f91a)) | ||
* environment cache invalidation ([#449](https://github.com/s-panferov/awesome-typescript-loader/issues/449)) ([c073af1](https://github.com/s-panferov/awesome-typescript-loader/commit/c073af1)) | ||
<a name="3.2.0-rc.0"></a> | ||
@@ -7,0 +19,0 @@ # [3.2.0-rc.0](https://github.com/s-panferov/awesome-typescript-loader/compare/v3.1.3...v3.2.0-rc.0) (2017-06-16) |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var path = require("path"); | ||
var minimatch = require("minimatch"); | ||
var micromatch = require("micromatch"); | ||
var colors = require("colors"); | ||
@@ -399,5 +399,3 @@ var helpers_1 = require("../helpers"); | ||
var fileName = path.relative(context, file.fileName); | ||
return loaderConfig.reportFiles.every(function (pattern) { | ||
return minimatch(fileName, pattern); | ||
}); | ||
return micromatch(fileName, loaderConfig.reportFiles).length > 0; | ||
}); | ||
@@ -404,0 +402,0 @@ } |
@@ -47,3 +47,3 @@ "use strict"; | ||
var babelImpl = setupBabel(loaderConfig, context); | ||
var cacheIdentifier = setupCache(loaderConfig, tsImpl, webpack, babelImpl, context); | ||
var cacheIdentifier = setupCache(compilerConfig, loaderConfig, tsImpl, webpack, babelImpl, context); | ||
var compiler = webpack._compiler; | ||
@@ -100,4 +100,3 @@ setupWatchRun(compiler, instanceName); | ||
exports.setupTs = setupTs; | ||
function setupCache(loaderConfig, tsImpl, webpack, babelImpl, context) { | ||
var cacheIdentifier = null; | ||
function setupCache(compilerConfig, loaderConfig, tsImpl, webpack, babelImpl, context) { | ||
if (loaderConfig.useCache) { | ||
@@ -110,9 +109,9 @@ if (!loaderConfig.cacheDirectory) { | ||
} | ||
cacheIdentifier = { | ||
'typescript': tsImpl.version, | ||
return { | ||
typescript: tsImpl.version, | ||
'awesome-typescript-loader': pkg.version, | ||
'awesome-typescript-loader-query': webpack.query, | ||
'babel-core': babelImpl | ||
? babelImpl.version | ||
: null | ||
'babel-core': babelImpl ? babelImpl.version : null, | ||
babelPkg: pkg.babel, | ||
compilerConfig: compilerConfig, | ||
env: process.env.BABEL_ENV || process.env.NODE_ENV || 'development' | ||
}; | ||
@@ -282,6 +281,2 @@ } | ||
var emitError = function (msg) { | ||
if (compilation.bail) { | ||
console.error('Error in bail mode:', msg); | ||
process.exit(1); | ||
} | ||
if (asyncErrors) { | ||
@@ -288,0 +283,0 @@ console.log(msg, '\n'); |
@@ -43,3 +43,4 @@ import { LoaderConfig } from './interfaces'; | ||
apply(resolver: Resolver): void; | ||
isTyping(target: string): boolean; | ||
createPlugin(resolver: Resolver, mapping: Mapping): (request: any, callback: any) => any; | ||
} |
@@ -56,3 +56,3 @@ "use strict"; | ||
mappings.forEach(function (mapping) { | ||
if (mapping.target.indexOf('@types') === -1) { | ||
if (!_this.isTyping(mapping.target)) { | ||
resolver.plugin(_this.source, _this.createPlugin(resolver, mapping)); | ||
@@ -62,2 +62,5 @@ } | ||
}; | ||
PathPlugin.prototype.isTyping = function (target) { | ||
return target.indexOf('@types') !== -1 || target.indexOf('.d.ts') !== -1; | ||
}; | ||
PathPlugin.prototype.createPlugin = function (resolver, mapping) { | ||
@@ -64,0 +67,0 @@ var _this = this; |
{ | ||
"name": "awesome-typescript-loader", | ||
"version": "3.2.0-rc.0", | ||
"version": "3.2.0", | ||
"description": "Awesome TS loader for webpack", | ||
@@ -39,3 +39,3 @@ "main": "dist/entry.js", | ||
"lodash": "^4.17.4", | ||
"minimatch": "^3.0.4", | ||
"micromatch": "^3.0.3", | ||
"mkdirp": "^0.5.1", | ||
@@ -46,11 +46,11 @@ "object-assign": "^4.1.1", | ||
"devDependencies": { | ||
"@types/chai": "^4.0.0", | ||
"@types/chai": "^4.0.1", | ||
"@types/colors": "^1.1.3", | ||
"@types/lodash": "^4.14.66", | ||
"@types/minimatch": "^2.0.29", | ||
"@types/lodash": "^4.14.67", | ||
"@types/micromatch": "^2.3.29", | ||
"@types/mocha": "^2.2.41", | ||
"@types/node": "^7.0.31", | ||
"@types/node": "^8.0.5", | ||
"@types/shelljs": "^0.7.2", | ||
"@types/sinon": "^2.3.1", | ||
"@types/webpack": "^2.2.15", | ||
"@types/sinon": "^2.3.2", | ||
"@types/webpack": "^3.0.1", | ||
"bluebird": "^3.5.0", | ||
@@ -67,5 +67,5 @@ "chai": "^4.0.2", | ||
"tslint": "^5.4.3", | ||
"typescript": "^2.3.4", | ||
"typescript": "^2.4.1", | ||
"webpack": "^2.6.1" | ||
} | ||
} |
@@ -131,3 +131,3 @@ # The best TypeScript loader for Webpack | ||
### transpileOnly *(boolean) (default=true)* | ||
### transpileOnly *(boolean)* | ||
@@ -134,0 +134,0 @@ Use this setting to disable type checking. |
@@ -24,3 +24,3 @@ import { | ||
export default class App extends React.Component<{title: string}, void> { | ||
export default class App extends React.Component<{title: string}, {}> { | ||
render() { | ||
@@ -27,0 +27,0 @@ return <div>{ this.props.title }</div> |
import * as ts from 'typescript'; | ||
import * as path from 'path'; | ||
import * as minimatch from 'minimatch'; | ||
import * as micromatch from 'micromatch'; | ||
import * as colors from 'colors'; | ||
@@ -446,5 +446,3 @@ import { findResultFor, toUnix } from '../helpers'; | ||
const fileName = path.relative(context, file.fileName); | ||
return loaderConfig.reportFiles.every(pattern => { | ||
return minimatch(fileName, pattern); | ||
}); | ||
return micromatch(fileName, loaderConfig.reportFiles).length > 0; | ||
}); | ||
@@ -451,0 +449,0 @@ } |
@@ -122,2 +122,3 @@ import * as fs from 'fs'; | ||
let cacheIdentifier = setupCache( | ||
compilerConfig, | ||
loaderConfig, | ||
@@ -194,2 +195,3 @@ tsImpl, | ||
function setupCache( | ||
compilerConfig: TsConfig, | ||
loaderConfig: LoaderConfig, | ||
@@ -201,3 +203,2 @@ tsImpl: typeof ts, | ||
) { | ||
let cacheIdentifier = null; | ||
if (loaderConfig.useCache) { | ||
@@ -212,9 +213,10 @@ if (!loaderConfig.cacheDirectory) { | ||
cacheIdentifier = { | ||
'typescript': tsImpl.version, | ||
return { | ||
typescript: tsImpl.version, | ||
'awesome-typescript-loader': pkg.version, | ||
'awesome-typescript-loader-query': webpack.query, | ||
'babel-core': babelImpl | ||
? babelImpl.version | ||
: null | ||
'babel-core': babelImpl ? babelImpl.version : null, | ||
babelPkg: pkg.babel, | ||
// TODO: babelrc.json/babelrc.js | ||
compilerConfig, | ||
env: process.env.BABEL_ENV || process.env.NODE_ENV || 'development' | ||
}; | ||
@@ -440,7 +442,2 @@ } | ||
let emitError = (msg) => { | ||
if (compilation.bail) { | ||
console.error('Error in bail mode:', msg); | ||
process.exit(1); | ||
} | ||
if (asyncErrors) { | ||
@@ -447,0 +444,0 @@ console.log(msg, '\n'); |
@@ -119,4 +119,4 @@ import { setupTs, readConfigFile } from './instance'; | ||
mappings.forEach(mapping => { | ||
if (mapping.target.indexOf('@types') === -1) { | ||
// skip "phantom" type references | ||
// skip "phantom" type references | ||
if (!this.isTyping(mapping.target)) { | ||
resolver.plugin(this.source, this.createPlugin(resolver, mapping)); | ||
@@ -127,2 +127,6 @@ } | ||
isTyping(target: string) { | ||
return target.indexOf('@types') !== -1 || target.indexOf('.d.ts') !== -1; | ||
} | ||
createPlugin(resolver: Resolver, mapping: Mapping) { | ||
@@ -129,0 +133,0 @@ return (request, callback) => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
371662
0
4757
12
+ Addedmicromatch@^3.0.3
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbraces@2.3.2(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfill-range@4.0.0(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-number@3.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmicromatch@3.1.10(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedms@2.0.0(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.1(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedurix@0.1.0(transitive)
+ Addeduse@3.1.1(transitive)
- Removedminimatch@^3.0.4
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedminimatch@3.1.2(transitive)