Skip to content

Commit 14f8c9b

Browse files
committed
Update tooling and tests ✨
1 parent 6b66cb0 commit 14f8c9b

9 files changed

Lines changed: 4973 additions & 3282 deletions

File tree

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
on: [push]
3+
jobs:
4+
build:
5+
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
6+
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
node: ['10.x', '12.x', '14.x']
11+
os: [ubuntu-latest, windows-latest, macOS-latest]
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v2
16+
17+
- name: Use Node ${{ matrix.node }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node }}
21+
22+
- name: Install deps and build (with cache)
23+
uses: bahmutov/npm-install@v1
24+
25+
- name: Lint
26+
run: yarn lint
27+
28+
- name: Test
29+
run: yarn test --ci --coverage --maxWorkers=2
30+
31+
- name: Build
32+
run: yarn build

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
testEnvironment: 'node',
3+
}

package.json

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
{
2-
"name": "git-revision-webpack-plugin",
32
"version": "3.0.4",
3+
"license": "MIT",
44
"main": "dist/index.js",
5-
"module": "dist/git-revision-webpack-plugin.esm.js",
65
"typings": "dist/index.d.ts",
76
"files": [
8-
"dist"
7+
"dist",
8+
"src"
99
],
1010
"repository": {
1111
"type": "git",
1212
"url": "https://github.com/pirelenito/git-revision-webpack-plugin.git"
1313
},
14-
"keywords": [
15-
"git",
16-
"git-describe",
17-
"plugin",
18-
"version",
19-
"webpack"
20-
],
21-
"author": "Paulo Ragonha",
22-
"license": "MIT",
23-
"bugs": {
24-
"url": "https://github.com/pirelenito/git-revision-webpack-plugin/issues"
14+
"engines": {
15+
"node": ">=10"
2516
},
26-
"homepage": "https://github.com/pirelenito/git-revision-webpack-plugin",
2717
"scripts": {
2818
"start": "tsdx watch",
2919
"build": "tsdx build",
30-
"test": "tsdx test --env=node",
31-
"lint": "tsdx lint"
20+
"test": "tsdx test",
21+
"lint": "tsdx lint",
22+
"prepare": "tsdx build",
23+
"size": "size-limit",
24+
"analyze": "size-limit --why"
3225
},
3326
"peerDependencies": {},
3427
"prettier": {
@@ -37,13 +30,32 @@
3730
"singleQuote": true,
3831
"trailingComma": "all"
3932
},
33+
"name": "git-revision-webpack-plugin",
34+
"author": "Paulo Ragonha",
35+
"bugs": {
36+
"url": "https://github.com/pirelenito/git-revision-webpack-plugin/issues"
37+
},
38+
"homepage": "https://github.com/pirelenito/git-revision-webpack-plugin",
39+
"module": "dist/git-revision-webpack-plugin.esm.js",
40+
"size-limit": [
41+
{
42+
"path": "dist/git-revision-webpack-plugin.cjs.production.min.js",
43+
"limit": "10 KB"
44+
},
45+
{
46+
"path": "dist/git-revision-webpack-plugin.esm.js",
47+
"limit": "10 KB"
48+
}
49+
],
4050
"devDependencies": {
41-
"@types/fs-extra": "^8.0.0",
42-
"@types/jest": "^24.0.18",
43-
"@types/webpack": "^4.39.2",
44-
"tsdx": "^0.9.3",
45-
"tslib": "^1.10.0",
46-
"typescript": "^3.6.3",
47-
"webpack": "^4.41.0"
51+
"@size-limit/preset-small-lib": "^4.10.2",
52+
"@types/fs-extra": "^9.0.11",
53+
"@types/webpack": "4.41.27",
54+
"fs-extra": "^9.1.0",
55+
"size-limit": "^4.10.2",
56+
"tsdx": "^0.14.1",
57+
"tslib": "^2.2.0",
58+
"typescript": "^4.2.4",
59+
"webpack": "^4.1.1"
4860
}
4961
}

test/index.spec.js

Lines changed: 0 additions & 133 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const targetGitRepository = path.join(__dirname, '../tmp/project/.git')
1212

1313
const targetBuild = path.join(__dirname, '../tmp/build')
1414

15-
describe('git-revision-webpack-plugin (integration)', function() {
15+
describe('git-revision-webpack-plugin default', function() {
1616
beforeEach(function(done) {
1717
fs.emptyDirSync(targetProject)
1818
fs.copySync(sourceProject, targetProject)

0 commit comments

Comments
 (0)