Skip to content

Commit

Permalink
- Breaking change: Stop supporting older behavior against layers of a…
Browse files Browse the repository at this point in the history
…rity one or two

    (will now drop one with no `done`)
- Breaking change: We now catch errors within layers so as to support more
    intuitive passing of errors (when synchronous)
- Breaking change: No longer throws when login is missing a callback (as may use as Promise)
- Breaking change: Only return from `serializeUser`, `deserializeUser` (and `transformAuthInfo`)
    when giving a synchronous serialized result or a Promise (do not do `return done()`)
- Enhancement: Promises for `serializeUser`, `deserializeUser`, `transformAuthInfo`
    (including allowing throwing `new Error('pass')` to pass); avoid need for `done`
- Enhancement: Allow `serializeUser` or `deserializeUser` to return non-`undefined`
    value for sync behavior
- Refactoring: Return Promise from `req.logIn` and from authenticate middleware's
    `strategy.success`
- Makefile: Add missing `clean-cov`
- Testing: Add tests with `req.logIn` and `SessionStrategy` returning without `done`
    (synchronously or with Promise)
- Docs: Show example of a `LocalStrategy` using async/await
- Docs: Avoid showing connect `cookieParser` with `session`;
    use current `expressSession` over `connect.session`
- Linting: jsdoc
- Git: Ignore .github/docs/jsdoc
- npm/Docs: Add jsdoc with script, along with static server and open-cli to open
- npm: Update devDeps
- npm: Add `test-one` script; remove self from contributors
  • Loading branch information
brettz9 committed Jun 26, 2019
1 parent e056ba7 commit b3a5346
Show file tree
Hide file tree
Showing 31 changed files with 3,080 additions and 504 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
coverage/
node_modules/
var/
docs/jsdoc
11 changes: 9 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ module.exports = {
// Override ash-nazg's current preference for ESM
'plugin:node/recommended-script'
],
settings: {
polyfills: [
// Needing these for some reason to avoid an error
"Promise",
"Promise.reject",
"Promise.resolve"
]
},
overrides: [
{
files: ['test/**'],
Expand Down Expand Up @@ -60,9 +68,8 @@ module.exports = {
'no-underscore-dangle': 0,
'no-param-reassign': 0,

// Disable until implementing promises and Node version supporting
// Disable as middleware approach requires some callbacks
'promise/prefer-await-to-callbacks': 0,
'promise/prefer-await-to-then': 0,

// Disable until ready to tackle
'require-jsdoc': 0,
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
reports/
docs/
docs/jsdoc
.github/docs/jsdoc
var/


Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ LCOVFILE = ./reports/coverage/lcov.info

MOCHAFLAGS = --require ./test/bootstrap/node

COVDIR = ./var/cov/*

view-docs:
open ./docs/index.html

view-cov:
open ./var/cov/index.html

clean-cov:
-rm -r $(COVDIR)

clean: clean-docs clean-cov
-rm -r $(REPORTSDIR)

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Passport-Next/Passport
# Passport-Next/Passport

Status:
[![NPM version](https://img.shields.io/npm/v/@passport-next/passport.svg)](https://www.npmjs.com/package/@passport-next/passport)
Expand Down Expand Up @@ -44,4 +44,3 @@ We support all [node versions](https://github.com/nodejs/Release) supported by t
## Contributing

Please see [CONTRIBUTING.md](https://github.com/passport-next/passport/blob/master/CONTRIBUTING.md)

32 changes: 32 additions & 0 deletions docs/jsdoc-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
'use strict';

module.exports = {
recurseDepth: 10,
source: {
exclude: [
'node_modules',
'dist',
'var',
'coverage',
'test'
]
// excludePattern: ''
},
sourceType: 'module',
tags: {
allowUnknownTags: false
},
templates: {
cleverLinks: true,
monospaceLinks: false /* ,
default: {
layoutFile: 'docs/layout.tmpl'
} */
},
opts: {
recurse: true,
verbose: true,
destination: 'docs/jsdoc'
// tutorials: 'docs/tutorials'
}
};
Loading

0 comments on commit b3a5346

Please sign in to comment.