Skip to content

Commit

Permalink
Update tooling and tests ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
pirelenito committed May 2, 2021
1 parent 6b66cb0 commit 14f8c9b
Show file tree
Hide file tree
Showing 9 changed files with 4,973 additions and 3,282 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI
on: [push]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['10.x', '12.x', '14.x']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1

- name: Lint
run: yarn lint

- name: Test
run: yarn test --ci --coverage --maxWorkers=2

- name: Build
run: yarn build
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
testEnvironment: 'node',
}
60 changes: 36 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
{
"name": "git-revision-webpack-plugin",
"version": "3.0.4",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/git-revision-webpack-plugin.esm.js",
"typings": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src"
],
"repository": {
"type": "git",
"url": "https://github.com/pirelenito/git-revision-webpack-plugin.git"
},
"keywords": [
"git",
"git-describe",
"plugin",
"version",
"webpack"
],
"author": "Paulo Ragonha",
"license": "MIT",
"bugs": {
"url": "https://github.com/pirelenito/git-revision-webpack-plugin/issues"
"engines": {
"node": ">=10"
},
"homepage": "https://github.com/pirelenito/git-revision-webpack-plugin",
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test --env=node",
"lint": "tsdx lint"
"test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build",
"size": "size-limit",
"analyze": "size-limit --why"
},
"peerDependencies": {},
"prettier": {
Expand All @@ -37,13 +30,32 @@
"singleQuote": true,
"trailingComma": "all"
},
"name": "git-revision-webpack-plugin",
"author": "Paulo Ragonha",
"bugs": {
"url": "https://github.com/pirelenito/git-revision-webpack-plugin/issues"
},
"homepage": "https://github.com/pirelenito/git-revision-webpack-plugin",
"module": "dist/git-revision-webpack-plugin.esm.js",
"size-limit": [
{
"path": "dist/git-revision-webpack-plugin.cjs.production.min.js",
"limit": "10 KB"
},
{
"path": "dist/git-revision-webpack-plugin.esm.js",
"limit": "10 KB"
}
],
"devDependencies": {
"@types/fs-extra": "^8.0.0",
"@types/jest": "^24.0.18",
"@types/webpack": "^4.39.2",
"tsdx": "^0.9.3",
"tslib": "^1.10.0",
"typescript": "^3.6.3",
"webpack": "^4.41.0"
"@size-limit/preset-small-lib": "^4.10.2",
"@types/fs-extra": "^9.0.11",
"@types/webpack": "4.41.27",
"fs-extra": "^9.1.0",
"size-limit": "^4.10.2",
"tsdx": "^0.14.1",
"tslib": "^2.2.0",
"typescript": "^4.2.4",
"webpack": "^4.1.1"
}
}
133 changes: 0 additions & 133 deletions test/index.spec.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const targetGitRepository = path.join(__dirname, '../tmp/project/.git')

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

describe('git-revision-webpack-plugin (integration)', function() {
describe('git-revision-webpack-plugin default', function() {
beforeEach(function(done) {
fs.emptyDirSync(targetProject)
fs.copySync(sourceProject, targetProject)
Expand Down
Loading

0 comments on commit 14f8c9b

Please sign in to comment.