Skip to content

Commit

Permalink
Release 5.0.0 (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-oles committed Jun 13, 2020
2 parents 5552f62 + d056616 commit 5ba6839
Show file tree
Hide file tree
Showing 303 changed files with 14,212 additions and 9,635 deletions.
1 change: 0 additions & 1 deletion .eslintignore
@@ -1,2 +1 @@
/src/types/**
/lib/**
15 changes: 9 additions & 6 deletions .eslintrc.js
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.
39 changes: 14 additions & 25 deletions .github/workflows/main.yml
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,29 +61,27 @@ 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
with:
name: lib

path: lib

- 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 All @@ -105,10 +90,14 @@ jobs:
with:
node-version: 12

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

- name: Download build artifact
uses: actions/download-artifact@v1
with:
name: lib
path: lib

- name: Release
run: npx semantic-release@16.0.2
run: yarn semantic-release
21 changes: 7 additions & 14 deletions .gitignore
@@ -1,27 +1,20 @@
# Logs
logs
*.log
npm-debug.log*

# Package artifacts
lib
!test/**/lib

# Package archive used by e2e tests
fork-ts-checker-webpack-plugin-0.0.0-semantic-release.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

# Mac OS
.DS_Store
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
6.9.11
10
5 changes: 1 addition & 4 deletions .prettierrc
@@ -1,7 +1,4 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"useTabs": false,
"printWidth": 80
"printWidth": 100
}
561 changes: 255 additions & 306 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
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',
},
},
};
6 changes: 6 additions & 0 deletions examples/babel-loader/.babelrc.js
@@ -0,0 +1,6 @@
module.exports = {
"presets": [
"@babel/preset-env",
"@babel/preset-typescript"
]
}
17 changes: 17 additions & 0 deletions examples/babel-loader/README.md
@@ -0,0 +1,17 @@
## babel-loader configuration example

It's a basic configuration of the plugin and [babel-loader](https://github.com/babel/babel-loader).
Very similar to the [ts-loader example](../ts-loader), the main difference in the configuration is that we
enable **syntactic diagnostics**:

```js
new ForkTsCheckerWebpackPlugin({
typescript: {
diagnosticOptions: {
semantic: true,
syntactic: true,
},
},
})
```

21 changes: 21 additions & 0 deletions examples/babel-loader/package.json
@@ -0,0 +1,21 @@
{
"name": "fork-ts-checker-webpack-plugin-babel-loader-example",
"version": "0.0.0",
"main": "dist/index.js",
"license": "MIT",
"scripts": {
"dev": "webpack-dev-server",
"build": "webpack -p"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@babel/preset-typescript": "^7.6.0",
"babel-loader": "^8.0.0",
"fork-ts-checker-webpack-plugin": "^5.0.0-alpha.9",
"typescript": "^3.8.0",
"webpack": "^4.0.0",
"webpack-cli": "^3.0.0",
"webpack-dev-server": "^3.0.0"
}
}
1 change: 1 addition & 0 deletions examples/babel-loader/src/index.ts
@@ -0,0 +1 @@
console.log('Hello world');
18 changes: 18 additions & 0 deletions examples/babel-loader/tsconfig.json
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ES5",
"module": "CommonJS",
"lib": ["ES5", "ScriptHost"],
"moduleResolution": "Node",
"esModuleInterop": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"strict": true,
"baseUrl": "./src",
"outDir": "./dist",
"forceConsistentCasingInFileNames": true,
"importsNotUsedAsValues": "preserve" // this is important for proper files watching
},
"include": ["./src"],
"exclude": ["node_modules"]
}
28 changes: 28 additions & 0 deletions examples/babel-loader/webpack.config.js
@@ -0,0 +1,28 @@
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = {
context: __dirname,
entry: './src/index.ts',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new ForkTsCheckerWebpackPlugin({
typescript: {
diagnosticOptions: {
semantic: true,
syntactic: true,
},
},
}),
],
};
@@ -1,10 +1,8 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
rules: {
'@typescript-eslint/array-type': 'error'
}
extends: ['plugin:@typescript-eslint/recommended']
};
3 changes: 3 additions & 0 deletions examples/eslint/README.md
@@ -0,0 +1,3 @@
## eslint configuration example

It's a basic configuration of the plugin and [eslint](https://github.com/eslint/eslint).
22 changes: 22 additions & 0 deletions examples/eslint/package.json
@@ -0,0 +1,22 @@
{
"name": "fork-ts-checker-webpack-plugin-eslint-example",
"version": "0.0.0",
"main": "dist/index.js",
"license": "MIT",
"scripts": {
"dev": "webpack-dev-server",
"build": "webpack -p"
},
"devDependencies": {
"@types/eslint": "^6.8.0",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"eslint": "^6.8.0",
"fork-ts-checker-webpack-plugin": "^5.0.0-alpha.9",
"ts-loader": "^7.0.0",
"typescript": "^3.8.0",
"webpack": "^4.0.0",
"webpack-cli": "^3.0.0",
"webpack-dev-server": "^3.0.0"
}
}
1 change: 1 addition & 0 deletions examples/eslint/src/index.ts
@@ -0,0 +1 @@
console.log('Hello world');
18 changes: 18 additions & 0 deletions examples/eslint/tsconfig.json
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ES5",
"module": "CommonJS",
"lib": ["ES5", "ScriptHost"],
"moduleResolution": "Node",
"esModuleInterop": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"strict": true,
"baseUrl": "./src",
"outDir": "./dist",
"forceConsistentCasingInFileNames": true,
"importsNotUsedAsValues": "preserve" // this is important for proper files watching
},
"include": ["./src"],
"exclude": ["node_modules"]
}
29 changes: 29 additions & 0 deletions examples/eslint/webpack.config.js
@@ -0,0 +1,29 @@
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = {
context: __dirname,
entry: './src/index.ts',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: {
transpileOnly: true,
},
},
],
},
plugins: [
new ForkTsCheckerWebpackPlugin({
eslint: {
enabled: true,
files: './src/**/*',
},
}),
],
};
3 changes: 3 additions & 0 deletions examples/ts-loader/README.md
@@ -0,0 +1,3 @@
## ts-loader configuration example

It's a basic configuration of the plugin and [ts-loader](https://github.com/TypeStrong/ts-loader).

0 comments on commit 5ba6839

Please sign in to comment.