Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Commit

Permalink
refactor: update some deps
Browse files Browse the repository at this point in the history
  • Loading branch information
s-panferov committed Jun 10, 2018
1 parent ee7bcf5 commit 035c0c0
Show file tree
Hide file tree
Showing 7 changed files with 1,087 additions and 3,488 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Expand Up @@ -7,4 +7,4 @@
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": true
}
}
148 changes: 74 additions & 74 deletions package.json
@@ -1,75 +1,75 @@
{
"name": "awesome-typescript-loader",
"version": "5.0.0",
"description": "Awesome TS loader for webpack",
"main": "dist/entry.js",
"typings": "./dist/index.d.ts",
"scripts": {
"prepublish": "npm run build",
"watch": "npm run watch:ts",
"watch:ts": "npm run build:ts -- --watch --diagnostics",
"prebuild": "npm run lint",
"compile": "tsc --pretty",
"build": "rimraf dist && tsc --pretty",
"lint": "tslint src/*.ts",
"release": "standard-version",
"test": "rimraf .test && mocha --trace-warnings --timeout 30000 dist/__test__",
"precommit": "lint-staged"
},
"author": "Stanislav Panferov <fnight.m@gmail.com> (http://panferov.me/)",
"repository": {
"type": "git",
"url": "https://github.com/s-panferov/awesome-typescript-loader.git"
},
"license": "MIT",
"keywords": [
"webpack",
"loader",
"webpack-loader",
"typescript"
],
"bugs": {
"url": "https://github.com/s-panferov/awesome-typescript-loader/issues"
},
"homepage": "https://github.com/s-panferov/awesome-typescript-loader",
"dependencies": {
"chalk": "^2.3.1",
"enhanced-resolve": "^4.0.0",
"loader-utils": "^1.1.0",
"lodash": "^4.17.5",
"micromatch": "^3.1.9",
"mkdirp": "^0.5.1",
"source-map-support": "^0.5.3"
},
"peerDependencies": {
"typescript": "^2.7"
},
"devDependencies": {
"@types/chai": "^4.0.1",
"@types/lodash": "^4.14.67",
"@types/micromatch": "^3.1.0",
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.5",
"@types/shelljs": "^0.7.8",
"@types/sinon": "^2.3.2",
"@types/webpack": "^4.0.0",
"bluebird": "^3.5.0",
"chai": "^4.0.2",
"empty-module": "0.0.2",
"fs-extra": "^5.0.0",
"mocha": "^3.4.2",
"ps-node": "^0.1.6",
"rimraf": "^2.6.1",
"shelljs": "^0.7.8",
"standard-version": "^4.3.0",
"temp": "^0.8.3",
"tslint": "^5.4.3",
"prettier": "^1.10.2",
"lint-staged": "^7.0.0",
"husky": "^0.14.3",
"typescript": "^2.7.2",
"webpack": "^4.1.0",
"webpack-cli": "^2.0.10",
"webpack-log": "^1.2.0"
}
}
"name": "awesome-typescript-loader",
"version": "5.0.0",
"description": "Awesome TS loader for webpack",
"main": "dist/entry.js",
"typings": "./dist/index.d.ts",
"scripts": {
"prepublish": "npm run build",
"watch": "npm run watch:ts",
"watch:ts": "npm run build:ts -- --watch --diagnostics",
"prebuild": "npm run lint",
"compile": "tsc --pretty",
"build": "rimraf dist && tsc --pretty",
"lint": "tslint src/*.ts",
"release": "standard-version",
"test": "rimraf .test && mocha --trace-warnings --timeout 30000 dist/__test__",
"precommit": "lint-staged"
},
"author": "Stanislav Panferov <fnight.m@gmail.com> (http://panferov.me/)",
"repository": {
"type": "git",
"url": "https://github.com/s-panferov/awesome-typescript-loader.git"
},
"license": "MIT",
"keywords": [
"webpack",
"loader",
"webpack-loader",
"typescript"
],
"bugs": {
"url": "https://github.com/s-panferov/awesome-typescript-loader/issues"
},
"homepage": "https://github.com/s-panferov/awesome-typescript-loader",
"dependencies": {
"chalk": "^2.4.1",
"enhanced-resolve": "^4.0.0",
"loader-utils": "^1.1.0",
"lodash": "^4.17.5",
"micromatch": "^3.1.9",
"mkdirp": "^0.5.1",
"source-map-support": "^0.5.3"
},
"peerDependencies": {
"typescript": "^2.7"
},
"devDependencies": {
"@types/chai": "^4.1.3",
"@types/lodash": "^4.14.109",
"@types/micromatch": "^3.1.0",
"@types/mocha": "^5.2.1",
"@types/node": "^10.3.2",
"@types/shelljs": "^0.8.0",
"@types/sinon": "^5.0.1",
"@types/webpack": "^4.4.0",
"bluebird": "^3.5.1",
"chai": "^4.1.2",
"empty-module": "0.0.2",
"fs-extra": "^6.0.1",
"husky": "^0.14.3",
"lint-staged": "^7.1.3",
"mocha": "^5.2.0",
"prettier": "^1.13.5",
"ps-node": "^0.1.6",
"rimraf": "^2.6.1",
"shelljs": "^0.7.8",
"standard-version": "^4.4.0",
"temp": "^0.8.3",
"tslint": "^5.10.0",
"typescript": "^2.9.1",
"webpack": "^4.12.0",
"webpack-cli": "^3.0.3",
"webpack-log": "^1.2.0"
}
}
4 changes: 2 additions & 2 deletions src/__test__/rename-case.ts
@@ -1,6 +1,6 @@
import { src, webpackConfig, tsconfig, watch, expectErrors, spec } from './utils'
import { src, webpackConfig, tsconfig, watch, expectErrors, xspec } from './utils'

spec(__filename, async function() {
xspec(__filename, async function() {
const index = src(
'index.ts',
`
Expand Down
2 changes: 1 addition & 1 deletion src/__test__/utils.ts
Expand Up @@ -40,7 +40,7 @@ const OUT_DIR = './out'
const WEBPACK = path.join(
path.dirname(path.dirname(require.resolve('webpack-cli'))),
'bin',
'webpack.js'
'cli.js'
)

mkdirp.sync(TEST_DIR)
Expand Down
17 changes: 8 additions & 9 deletions src/instance.ts
Expand Up @@ -139,9 +139,11 @@ export function ensureInstance(
let compiler = <any>webpack._compiler

if (!rootCompiler.hooks) {
throw new Error('It looks like you\'re using an old webpack version without hooks support. ' +
'If you\'re using awesome-script-loader with React storybooks consider ' +
'upgrading @storybook/react to at least version 4.0.0-alpha.3');
throw new Error(
"It looks like you're using an old webpack version without hooks support. " +
"If you're using awesome-script-loader with React storybooks consider " +
'upgrading @storybook/react to at least version 4.0.0-alpha.3'
)
}

setupWatchRun(compiler, instanceName)
Expand Down Expand Up @@ -387,7 +389,7 @@ function setupWatchRun(compiler, instanceName: string) {
const lastCompiled = instance.compiledFiles

instance.compiledFiles = {}
instance.compiledDeclarations = [];
instance.compiledDeclarations = []
instance.startTime = startTime

const set = new Set(Object.keys(times).map(toUnix))
Expand Down Expand Up @@ -483,10 +485,7 @@ function setupAfterCompile(compiler, instanceName, forkChecker = false) {
})

instance.compiledDeclarations.forEach(declaration => {
const assetPath = path.relative(
compilation.compiler.context,
declaration.name
)
const assetPath = path.relative(compilation.compiler.outputPath, declaration.name)
compilation.assets[assetPath] = {
source: () => declaration.text,
size: () => declaration.text.length
Expand All @@ -510,7 +509,7 @@ function setupAfterCompile(compiler, instanceName, forkChecker = false) {
}

diags.forEach(diag => emitError(diag.pretty))
})
})

files
.then(() => {
Expand Down
138 changes: 67 additions & 71 deletions tslint.json
@@ -1,73 +1,69 @@
{
"exclude": [
"node_modules"
],
"rules": {
"jsx-boolean-value": false,
"jsx-curly-spacing": false,
"jsx-no-multiline-js": false,
"jsx-wrap-multiline": false,
"jsx-alignment": false,
"jsx-no-lambda": true,
"jsx-no-string-ref": false,
"class-name": true,
"curly": true,
"indent": [
true,
"tabs"
],
"quotemark": [
true,
"single",
"jsx-double",
"avoid-escape"
],
"max-line-length": [
true,
120
],
"member-ordering": [
true,
"statics-first"
],
"new-parens": true,
"no-arg": true,
"no-consecutive-blank-lines": true,
"no-console": [
true,
"time",
"timeEnd"
],
"no-debugger": true,
"no-eval": true,
"no-internal-module": true,
"no-mergeable-namespace": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-variable": [
true,
"react"
],
"no-var-keyword": true,
"one-variable-per-declaration": [
true,
"ignore-for-loop"
],
"semicolon": false,
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true
],
"use-isnan": true,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-type"
]
}
"exclude": [
"node_modules"
],
"rules": {
"jsx-boolean-value": false,
"jsx-curly-spacing": false,
"jsx-no-multiline-js": false,
"jsx-wrap-multiline": false,
"jsx-alignment": false,
"jsx-no-lambda": true,
"jsx-no-string-ref": false,
"class-name": true,
"curly": true,
"quotemark": [
true,
"single",
"jsx-double",
"avoid-escape"
],
"max-line-length": [
true,
120
],
"member-ordering": [
true,
"statics-first"
],
"new-parens": true,
"no-arg": true,
"no-consecutive-blank-lines": true,
"no-console": [
true,
"time",
"timeEnd"
],
"no-debugger": true,
"no-eval": true,
"no-internal-module": true,
"no-mergeable-namespace": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-variable": [
true,
"react"
],
"no-var-keyword": true,
"one-variable-per-declaration": [
true,
"ignore-for-loop"
],
"semicolon": false,
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true
],
"use-isnan": true,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-type"
]
}
}

0 comments on commit 035c0c0

Please sign in to comment.