Skip to content

Commit

Permalink
deps: use ^ instead of ~ (#42)
Browse files Browse the repository at this point in the history
drop debug dependency
  • Loading branch information
fengmk2 authored May 29, 2023
1 parent 6d848cb commit fd9e7a9
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 161 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI

on:
push:
branches: [ master ]

pull_request:
branches: [ master ]

jobs:
Job:
name: Node.js
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
version: '8, 10, 12, 14, 16, 18, 20'
4 changes: 0 additions & 4 deletions .jshintignore

This file was deleted.

95 changes: 0 additions & 95 deletions .jshintrc

This file was deleted.

5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

29 changes: 1 addition & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ TESTS = test/*.test.js
REPORTER = spec
TIMEOUT = 3000
MOCHA_OPTS =
REGISTRY = --registry=https://registry.npm.taobao.org

install:
@npm install $(REGISTRY) \
--disturl=https://npm.taobao.org/dist

jshint: install
@-./node_modules/.bin/jshint ./

test:
@NODE_ENV=test node \
Expand All @@ -22,30 +14,11 @@ test:
$(TESTS)

test-cov:
@NODE_ENV=test node \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
-- -u exports \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
--require should-http \
$(MOCHA_OPTS) \
$(TESTS)

test-travis:
@NODE_ENV=test node \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
--report lcovonly \
@NODE_ENV=test node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha \
-- -u exports \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
--require should-http \
$(MOCHA_OPTS) \
$(TESTS)

autod:
@./node_modules/.bin/autod $(REGISTRY) -w --prefix="~" -k should
@$(MAKE) install

.PHONY: test test-all
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
koa-userauth
=======
# koa-userauth

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Coveralls][coveralls-image]][coveralls-url]
[![David deps][david-image]][david-url]

[npm-image]: https://img.shields.io/npm/v/koa-userauth.svg?style=flat-square
[npm-url]: https://npmjs.org/package/koa-userauth
[travis-image]: https://img.shields.io/travis/koajs/userauth.svg?style=flat-square
[travis-url]: https://travis-ci.org/koajs/userauth
[coveralls-image]: https://img.shields.io/coveralls/koajs/userauth.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koajs/userauth?branch=master
[david-image]: https://img.shields.io/david/koajs/userauth.svg?style=flat-square
[david-url]: https://david-dm.org/koajs/userauth


`koa` user auth abstraction layer middleware.

## Install

```bash
$ npm install koa-userauth
npm install koa-userauth
```

## Usage
Expand Down Expand Up @@ -96,7 +85,6 @@ we will use [path-match](https://github.com/expressjs/path-match) transfer it to

> [Source image file](https://www.lucidchart.com/documents/edit/4749f226-b75f-42ef-934f-b89f7bd68c7f?driveId=0ACmMEQjF7GJGUk9PVA)

## License

[MIT](LICENSE)
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const debug = require('debug')('koa-userauth');
const debug = require('util').debuglog('koa-userauth');
const path = require('path');
const is = require('is-type-of');
const copy = require('copy-to');
Expand Down
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "user auth middleware for koa",
"main": "index.js",
"scripts": {
"test": "make test"
"test": "make test",
"ci": "make test-cov"
},
"repository": {
"type": "git",
Expand All @@ -26,9 +27,7 @@
},
"homepage": "https://github.com/koajs/userauth",
"devDependencies": {
"autod": "*",
"istanbul": "next",
"jshint": "^2.9.4",
"koa": "^2.4.1",
"koa-generic-session": "^2.0.0",
"koa-route": "^3.2.0",
Expand All @@ -39,10 +38,9 @@
"supertest": "^3.0.0"
},
"dependencies": {
"copy-to": "~2.0.1",
"debug": "~3.1.0",
"is-type-of": "~1.2.0",
"path-match": "~1.2.2"
"copy-to": "^2.0.1",
"is-type-of": "^1.4.0",
"path-match": "^1.2.4"
},
"engines": {
"node": ">= 8"
Expand Down

0 comments on commit fd9e7a9

Please sign in to comment.