Skip to content

Commit

Permalink
feat: move to github workflows and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandjitsu committed Sep 6, 2020
1 parent 5d21204 commit 4e8ea64
Show file tree
Hide file tree
Showing 9 changed files with 2,348 additions and 2,672 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,21 @@
name: Release
on:
push:
branches:
- master

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- run: yarn install --pure-lockfile
- run: yarn build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,38 @@
name: Test
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [10, 12, 14]

steps:
- uses: actions/checkout@master
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install
run: yarn install --pure-lockfile
- name: Test
run: yarn test:cov
- uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

41 changes: 0 additions & 41 deletions CHANGELOG.md

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -2,7 +2,9 @@

> A small package for generating cryptographically secure UIDs in the browser, safe for both cookie and URL usage.
[![Travis (.org) branch](https://img.shields.io/travis/rolandjitsu/uid/master.svg?style=flat-square)](https://github.com/rolandjitsu/uid)
[![npm](https://img.shields.io/npm/v/crypto-uid.svg?style=flat-square)](https://www.npmjs.com/package/crypto-uid)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/rolandjitsu/uid/Test?label=tests&style=flat-square)](https://github.com/rolandjitsu/uid/actions?query=workflow%3ATest)
[![Coveralls github branch](https://img.shields.io/coveralls/github/rolandjitsu/uid/master?style=flat-square)](https://coveralls.io/github/rolandjitsu/uid?branch=master)

This package is a mirror of [uid-safe](https://github.com/crypto-utils/uid-safe), but meant to be used in a browser env.
Additionally, it comes bundled with [TypeScript](https://www.typescriptlang.org) typings.
Expand Down
4 changes: 2 additions & 2 deletions jest.config.js
Expand Up @@ -4,8 +4,8 @@ module.exports = {
],
globals: {
'ts-jest': {
tsConfigFile: './tsconfig.spec.json',
enableTsDiagnostics: true
tsConfig: './tsconfig.spec.json',
diagnostics: true
}
},
transform: {
Expand Down
46 changes: 19 additions & 27 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "crypto-uid",
"version": "0.3.0",
"version": "0.0.0-development",
"description": "Cryptographically secure UIDs",
"main": "./dist/index.js",
"module": "./dist/es5/index.js",
Expand Down Expand Up @@ -38,38 +38,30 @@
"lint:fix": "yarn run lint -- --fix",
"pretest:cov": "yarn run lint",
"test:cov": "jest --coverage",
"test": "jest --watch",
"release": "standard-version"
},
"standard-version": {
"scripts": {
"prerelease": "yarn test:cov"
}
"test": "jest --watch"
},
"dependencies": {
"tslib": "^1.9.0"
"tslib": "^2.0.1"
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.54",
"@babel/core": "^7.11.6",
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@trust/webcrypto": "^0.9.2",
"@types/jest": "^23.3.1",
"@types/node": "^9.4.5",
"babel-core": "^7.0.0-0",
"babel-jest": "^23.4.0",
"camelcase": "^4.1.0",
"jest": "^23.5.0",
"npm-run-all": "^4.1.3",
"rollup": "^0.65.0",
"rollup-plugin-commonjs": "^9.1.6",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-uglify": "^4.0.0",
"standard-version": "^4.4.0",
"ts-jest": "^23.1.4",
"tslint": "^5.9.1",
"typescript": "2.8.3"
"@types/jest": "^26.0.13",
"@types/node": "^14.6.4",
"babel-jest": "^26.3.0",
"camelcase": "^6.0.0",
"jest": "^26.4.2",
"npm-run-all": "^4.1.5",
"rollup": "^2.26.10",
"rollup-plugin-sourcemaps": "^0.6.2",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^26.3.0",
"tslint": "^6.1.3",
"typescript": "^4.0.2"
},
"engines": {
"node": ">= 7.9"
"node": ">= 10"
}
}
10 changes: 5 additions & 5 deletions rollup.config.js
@@ -1,15 +1,15 @@
const camelCase = require('camelcase');
const commonjs = require('rollup-plugin-commonjs');
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const {nodeResolve} = require('@rollup/plugin-node-resolve');
const sourcemaps = require('rollup-plugin-sourcemaps');
const {uglify} = require('rollup-plugin-uglify');
const {terser} = require('rollup-plugin-terser');

const pckg = require('./package.json');
const name = pckg.name;
const input = pckg.module;

const plugins = [
resolve(),
nodeResolve(),
commonjs(),
sourcemaps()
];
Expand Down Expand Up @@ -46,7 +46,7 @@ export default [{
input,
plugins: [
...plugins,
uglify()
terser()
],
external,
output: {
Expand Down

0 comments on commit 4e8ea64

Please sign in to comment.