Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite to version 5.0.0 #404

Merged
merged 29 commits into from
May 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
07c31ef
chore: update semantic-release configuration (#410)
piotr-oles May 16, 2020
5bdc643
refactor(dependency): update babel-code-frame to @babel/code-frame (#…
andyrooger May 16, 2020
3a369ef
refactor: make CancellationToken independent from TypeScript
piotr-oles Jan 2, 2020
2a356d2
feat: initial implementation of the new architecture
piotr-oles Feb 3, 2020
f539ecb
fix: use 'afterCompile' hook to fix regression described in #57
piotr-oles Apr 18, 2020
931ab14
refactor: code-review requested changes
piotr-oles Apr 18, 2020
5e59c92
feat: upgrade min node version to 8
piotr-oles Apr 19, 2020
f80bda7
test: make existing unit tests work again
piotr-oles Apr 20, 2020
2ae85ef
chore: change typescript version from 2.7.0 to 2.7.1
piotr-oles Apr 20, 2020
b4e92da
test: modify tests to be able to run them on typescript 2.7.1
piotr-oles Apr 20, 2020
d10853b
chore: select patch version instead of major for typescript
piotr-oles Apr 20, 2020
9336dd0
test: add test and codeclimate configuration
piotr-oles Apr 21, 2020
58a5c24
fix: make project-references really working + e2e tests
piotr-oles May 15, 2020
6004b9b
feat: drop support for Node 8 and add Node 14 to the matrix
piotr-oles May 15, 2020
bd4dddb
test: update tests for compatibility with windows
piotr-oles May 15, 2020
6974ed2
test: stabilize e2e tests on linux and mac
piotr-oles May 17, 2020
61788c6
test: stabilize e2e tests on windows
piotr-oles May 19, 2020
8d6d1ec
test: add tests for vue and pnp typescript extension
piotr-oles May 20, 2020
3eb48e8
docs: update README.md to reflect new API
piotr-oles May 21, 2020
1342ae8
feat: add skipLibCheck compiler option as a default one
piotr-oles May 21, 2020
971a3ed
test: add type definitions test
piotr-oles May 21, 2020
9584c02
feat: add support for cosmiconfig
piotr-oles May 21, 2020
4479864
chore: add alpha branch to pre-release channels
piotr-oles May 21, 2020
0582b00
feat: use developer-friendly compilerOptions
piotr-oles May 21, 2020
f8c47df
feat: improve support for the `incremental` mode
piotr-oles May 21, 2020
9fe7852
feat: support webpack-dev-server errors for async mode
piotr-oles May 22, 2020
8b383df
feat: add support for eslint fix in the new codebase
piotr-oles May 22, 2020
8247ef8
fix: resolve vue.js cache bug and add e2e tests
piotr-oles May 23, 2020
d8ccc15
feat: improve message for vue.js compiler loading error
piotr-oles May 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/src/types/**
/lib/**
15 changes: 9 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ module.exports = {
tryExtensions: ['.js', '.json', '.ts', '.d.ts']
}
},
rules: {
'no-process-exit': 'off', // to investigate if we should throw an error instead of process.exit()
'node/no-unsupported-features/es-builtins': 'off',
'node/no-unsupported-features/es-syntax': 'off'
},
overrides: [
{
files: ['*.ts'],
Expand All @@ -24,7 +19,15 @@ module.exports = {
],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-namespace': 'off' // maybe we should consider enabling it in the future
'@typescript-eslint/no-use-before-define': 'off',
'node/no-unsupported-features/es-syntax': 'off'
}
},
{
files: ['*.spec.ts'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'node/no-missing-import': 'off'
}
}
]
Expand Down
Binary file added .github/.DS_Store
Binary file not shown.
32 changes: 8 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI/CD
on: [push, pull_request]
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -39,21 +39,8 @@ jobs:
needs: build
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node:
- '6'
- '8'
- '10'
- '12'
packages:
- webpack@5.0.0-alpha.5 ts-loader@^5.0.0 vue-loader@^15.2.4
- webpack@^4.0.0 ts-loader@^5.0.0 vue-loader@^15.2.4
exclude:
- node: '6'
packages: 'webpack@5.0.0-alpha.5 ts-loader@^5.0.0 vue-loader@^15.2.4'
node: [10, 12] # add 14 when we drop support for webpack 4 as fsevents 1 is not compatible with node 14
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1

Expand All @@ -74,10 +61,7 @@ jobs:
${{ runner.os }}-node-${{ matrix.node }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines

- name: Replace dependencies
run: yarn add ${{ matrix.packages }} -D --ignore-engines
run: yarn install --frozen-lockfile

- name: Download build artifact
uses: actions/download-artifact@v1
Expand All @@ -86,17 +70,17 @@ jobs:

- name: Run unit tests
run: yarn test:unit
- name: Run integration tests
run: yarn test:integration

- name: Run e2e tests
run: yarn test:e2e

release:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
needs: [build, test]
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta')
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')
steps:
- uses: actions/checkout@v1

Expand Down
18 changes: 4 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
# Logs
logs
*.log
npm-debug.log*

# Package artifacts
lib
!test/**/lib

# Package archive used by e2e tests
fork-ts-checker-webpack-plugin.tgz

# Coverage directory used by tools like istanbul
coverage

# Tmp directory for integration test
tmp

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm
package-lock.json

# Optional REPL history
.node_repl_history

# Editor directories and files
.idea
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.9.11
10
5 changes: 1 addition & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"useTabs": false,
"printWidth": 80
"printWidth": 100
}
582 changes: 285 additions & 297 deletions README.md

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions babel.config.js

This file was deleted.

18 changes: 9 additions & 9 deletions changelog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ module.exports = {
types: {
feat: {
description: 'A new feature',
value: 'feat'
value: 'feat',
},
fix: {
description: 'A bug fix',
value: 'fix'
value: 'fix',
},
refactor: {
description: 'A code change that neither adds a feature or fixes a bug',
value: 'refactor'
value: 'refactor',
},
perf: {
description: 'A code change that improves performance',
value: 'perf'
value: 'perf',
},
test: {
description: 'Adding missing tests',
value: 'test'
value: 'test',
},
chore: {
description: 'Build process, CI or auxiliary tool changes',
value: 'chore'
value: 'chore',
},
docs: {
description: 'Documentation only changes',
value: 'docs'
}
}
value: 'docs',
},
},
};
11 changes: 10 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFilesAfterEnv: ['./test/setup.ts']
setupFilesAfterEnv: ['./test/setup.ts'],
rootDir: '.',
moduleNameMapper: {
'^lib/(.*)$': '<rootDir>/lib/$1',
},
globals: {
'ts-jest': {
tsConfig: './test/tsconfig.json',
},
},
};
118 changes: 51 additions & 67 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
"version": "0.0.0-semantic-release",
"description": "Runs typescript type checker and linter on separate process.",
"keywords": [
"awesome-typescript-loader",
"checker",
"fast",
"fork",
"increment",
"linter",
"webpack",
"plugin",
"speed",
"ts-loader",
"type",
"typescript",
"webpack",
"webpack-plugin"
"webpack"
],
"bugs": {
"url": "https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues"
Expand All @@ -31,18 +26,19 @@
"John Reilly <johnny_reilly@hotmail.com> (https://blog.johnnyreilly.com)"
],
"files": [
"lib"
"./lib"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "rimraf lib && tsc --version && tsc --project \"./src\"",
"lint": "eslint ./src ./test --ext .ts --ext .js --ignore-pattern '/test/fixtures/**' --ignore-pattern '/test/tmp/**'",
"test": "yarn build && yarn test:unit && yarn test:integration",
"test:unit": "jest unit",
"test:integration": "jest integration && rimraf tmp",
"precommit": "lint-staged && yarn build && yarn test:unit",
"commit": "./node_modules/.bin/git-cz"
"build": "cross-env rimraf lib && cross-env tsc --version && cross-env tsc",
"lint": "cross-env eslint ./src ./test --ext .ts",
"test": "yarn build && yarn test:unit && yarn test:e2e",
"test:unit": "cross-env jest unit",
"test:pack": "yarn pack --filename fork-ts-checker-webpack-plugin.tgz",
"test:e2e": "yarn test:pack && cross-env jest e2e --ci --runInBand --bail --verbose",
"precommit": "cross-env lint-staged && yarn build && yarn test:unit",
"commit": "cross-env git-cz"
},
"husky": {
"hooks": {
Expand All @@ -56,76 +52,64 @@
]
},
"lint-staged": {
"linters": {
"*.js": [
"eslint --fix",
"prettier --write",
"git add"
],
"*.ts": [
"prettier --write",
"git add"
]
}
"*.ts": "eslint --fix"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"dependencies": {
"babel-code-frame": "^6.22.0",
"@babel/code-frame": "^7.8.3",
"chalk": "^2.4.1",
"micromatch": "^3.1.10",
"cosmiconfig": "^6.0.0",
"deepmerge": "^4.2.2",
"fs-extra": "^9.0.0",
"memfs": "^3.1.2",
"minimatch": "^3.0.4",
"schema-utils": "1.0.0",
"semver": "^5.6.0",
"tapable": "^1.0.0",
"worker-rpc": "^0.1.0"
"tapable": "^1.0.0"
},
"devDependencies": {
"@commitlint/config-conventional": "^7.5.0",
"@types/babel-code-frame": "^6.20.1",
"@types/jest": "^24.0.11",
"@types/lodash": "^4.14.134",
"@types/micromatch": "^3.1.0",
"@commitlint/config-conventional": "^8.3.4",
"@types/babel__code-frame": "^7.0.1",
"@types/cross-spawn": "^6.0.2",
"@types/eslint": "^6.8.0",
"@types/fs-extra": "^8.1.0",
"@types/jest": "^25.2.1",
"@types/minimatch": "^3.0.1",
"@types/mock-fs": "^4.10.0",
"@types/mock-require": "^2.0.0",
"@types/node": "^11.0.0",
"@types/rimraf": "^2.0.2",
"@types/semver": "^5.5.0",
"@types/webpack": "^4.4.19",
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"commitlint": "^7.5.2",
"copy-dir": "^0.4.0",
"css-loader": "0.28.11",
"@types/node": "^13.11.1",
"@types/rimraf": "^3.0.0",
"@types/schema-utils": "1.0.0",
"@types/semver": "^7.1.0",
"@types/webpack": "^4.41.11",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"commitlint": "^8.3.5",
"cross-env": "^7.0.2",
"cross-spawn": "^7.0.2",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.2",
"git-cz": "^3.0.1",
"husky": "^1.1.4",
"jest": "^24.7.1",
"lint-staged": "^8.0.5",
"lodash": "^4.17.11",
"mock-fs": "^4.3.0",
"mock-require": "^3.0.2",
"nativescript-vue-template-compiler": "^2.4.0",
"prettier": "^1.14.3",
"rimraf": "^3.0.0",
"ts-jest": "^24.2.0",
"ts-loader": "^5.0.0",
"typescript": "^3.0.1",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.3",
"git-cz": "^4.3.1",
"husky": "^4.2.5",
"jest": "^25.3.0",
"lint-staged": "^10.1.3",
"mock-fs": "^4.11.0",
"prettier": "^2.0.4",
"rimraf": "^3.0.2",
"strip-ansi": "^6.0.0",
"tree-kill": "^1.2.2",
"ts-jest": "^25.3.1",
"typescript": "^3.8.3",
"unixify": "^1.0.0",
"vue": "^2.5.16",
"vue-class-component": "^6.1.1",
"vue-loader": "^15.2.4",
"vue-template-compiler": "^2.5.16",
"webpack": "^4.0.0"
"webpack": "^4.42.1"
},
"engines": {
"node": ">=6.11.5",
"node": ">=10",
"yarn": ">=1.0.0"
}
}