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

awesome-typescript-loader

Package Overview
Dependencies
Maintainers
1
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awesome-typescript-loader - npm Package Compare versions

Comparing version 3.2.0-rc.0 to 3.2.0

12

CHANGELOG.md

@@ -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)

6

dist/checker/runtime.js
"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

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