Skip to content

Commit

Permalink
Merge (temporarily adding back README docs as reminder to add updated…
Browse files Browse the repository at this point in the history
… text to wiki when ready)
  • Loading branch information
brettz9 committed Feb 17, 2021
2 parents f10b61c + 4dd22e1 commit 3b1120e
Show file tree
Hide file tree
Showing 46 changed files with 7,859 additions and 708 deletions.
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
.git
coverage/
node_modules/
var/
docs/jsdoc
!*.js
30 changes: 18 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
'use strict';

module.exports = {
extends: ['ash-nazg/sauron', 'plugin:node/recommended-script'],
extends: [
'ash-nazg/sauron-node-script-overrides'
// '@passport-next/eslint-config-passport-next/sauron-node.js'
],
env: {
node: true,
es6: true
Expand All @@ -15,7 +19,7 @@ module.exports = {
},
overrides: [
{
files: ['test/**'],
files: ['test/*.js'],
extends: [
'ash-nazg/sauron',
'plugin:node/recommended-script',
Expand All @@ -24,8 +28,8 @@ module.exports = {
globals: {
expect: 'readonly'
},
env: {mocha: true},
rules: {
'jsdoc/require-jsdoc': 'off'
}
},
{
Expand All @@ -35,18 +39,20 @@ module.exports = {
{
files: '**/*.md/*.js',
rules: {
'eol-last': ['off'],
'no-console': ['off'],
'no-undef': ['off'],
'no-unused-vars': ['warn'],
'padded-blocks': ['off'],
'import/unambiguous': ['off'],
'import/no-unresolved': ['off'],
'node/no-missing-import': ['off'],
'func-names': 'off',
'import/newline-after-import': 'off',
'eol-last': 'off',
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': 'warn',
'padded-blocks': 'off',
'import/unambiguous': 'off',
'import/no-unresolved': 'off',
'node/no-missing-import': 'off',
'no-multi-spaces': 'off',
strict: 'off',
'no-useless-catch': 'off',
'sonarjs/no-useless-catch': 'off',
'radar/no-useless-catch': 'off',
'node/no-missing-require': [
'error', {
allowModules: [
Expand Down
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug Report
about: Report a bug
title: ''
labels: bug
assignees: ''
---

# READ THIS FIRST!

#### Is this a security issue?

If you discover a security issue please create an issue stating you've discovered a security
issue but don't divulge the issue, one of the maintainers will respond with an email address
you can send the details to. Once the issue has been patched the details can be made public.

<!-- Provide a brief summary of the issue in the title field above. -->

<!-- Provide a detailed description of your use case, including as much -->
<!-- detail as possible about what you are trying to accomplish and why. -->

### Expected behavior
<!-- Provide a detailed description of how you expected the software to -->
<!-- behave. -->

### Actual behavior
<!-- Provide a detailed description of how the software actually behaved, -->
<!-- including any rationale for why that behavior is incorrect. -->

### Steps to reproduce
<!-- Provide an unambiguous series of steps that can be used to reproduce -->
<!-- this issue, including any code if applicable. -->

```js
// Format code using Markdown code blocks
```

### Environment

* Operating System:
* Node version: <!-- $ node -v -->
* passport version: <!-- $ npm list @passport-next/passport -->
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature Request
about: Report a new feature
title: ''
labels: enhancement
assignees: ''
---

# READ THIS FIRST!

#### Is this a security issue?

If you discover a security issue please create an issue stating you've discovered a security
issue but don't divulge the issue, one of the maintainers will respond with an email address
you can send the details to. Once the issue has been patched the details can be made public.

<!-- Provide a brief summary of the feature in the title field above. -->

<!-- Provide a detailed description of your use case, including as much -->
<!-- detail as possible about what you are trying to accomplish and why. -->

### Environment

* Operating System:
* Node version: <!-- $ node -v -->
* passport version: <!-- $ npm list @passport-next/passport -->
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# READ THIS FIRST!

#### Is this a security patch?

If you discover a security issue please create an issue stating you've discovered a security
issue but don't divulge the issue, one of the maintainers will respond with an email address
you can send the details to. Once the issue has been patched the details can be made public.

<!-- Provide a brief summary of the request in the title field above. -->

<!-- Provide a detailed description of your use case, including as much -->
<!-- detail as possible about what you are trying to accomplish and why. -->
<!-- If this patch closes an open issue, include a reference to the issue -->
<!-- number. -->

### Checklist

<!-- Place an `x` in the boxes that apply. If you are unsure, please ask and -->
<!-- we will help. -->

- [ ] I have read the [CONTRIBUTING](https://github.com/passport-next/passport-local/blob/master/CONTRIBUTING.md) guidelines.
- [ ] I have updated the UNRELEASED section of the [CHANGELOG](https://github.com/passport-next/passport-local/blob/master/CHANGELOG.md).
- [ ] I have added myself to the contributors section of package.json if I wish to be listed
- [ ] I have added test cases which verify the correct operation of this feature or patch.
- [ ] I have added documentation pertaining to this feature or patch.
- [ ] The automated test suite (`$ npm test`) executes successfully.
- [ ] The automated code linting (`$ npm run-script lint`) executes successfully.
8 changes: 8 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Need help?

Please raise an [issue](https://github.com/passport-next/passport-local/issues) and/or ask a question on [Stackoverflow](https://stackoverflow.com) with the `passport.js` tag.

## Support policy

We support all [node versions](https://github.com/nodejs/Release) supported by the Node Foundation

12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
build/
reports/
docs/jsdoc
var/

# Mac OS X
.DS_Store

# Node.js
node_modules/
node_modules
npm-debug.log

# Mac OS X
.DS_Store
docs/jsdoc
# nyc
.nyc_output
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
dependency_scanning:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env DEP_SCAN_DISABLE_REMOTE_CHECKS="${DEP_SCAN_DISABLE_REMOTE_CHECKS:-false}"
--volume "$PWD:/code"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$SP_VERSION" /code
artifacts:
paths: [gl-dependency-scanning-report.json]

sast:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
--volume "$PWD:/code"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
artifacts:
paths: [gl-sast-report.json]
19 changes: 9 additions & 10 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
Makefile
README.md
build/
CONTRIBUTING.md
docs/
.eslintignore
.eslintrc.js
examples/
reports/
support/
.github/
.gitlab-ci.yml
.nyc_output
templates
test/
.travis.yml
var/

# Node.js
.npmignore
node_modules/
npm-debug.log

# Mac OS X
.DS_Store

# Git
.git*

# Utilities
.jshintrc
.travis.yml
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
language: "node_js"
language: node_js
node_js:
- 10
- 12
- 14

before_install:
- "npm install istanbul -g"
- "npm install coveralls -g"
- npm install istanbul -g
- npm install coveralls -g

script: "make ci-travis"
script:
- make ci-travis
- npm ci
- npm run lint

after_success:
- "make submit-cov-to-coveralls"
- make submit-cov-to-coveralls
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
This changelog follows Semantic Versioning https://semver.org/

# UNRELEASED

### Major

- Update `engines` to >= 10.0.0
- Enhancement: Implement Promise-based API

### Minor

### Patch

# 1.2.1 (2019-10-08)

### Patch

* Updated to use passport-next/skel #3 @rwky
* Linted @rwky

# 1.2.0 (2018-07-11)

### Minor

* Added `status` argument to `verified` method which is passed to the fail method if login fails @nfroidure @oatalabi

# 1.1.0 (2018-06-29)
Expand Down
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Contributing

Pull Requests are welcome for any issues, if you have any questions please
[raise an issue](https://github.com/passport-next/passport-local/issues).

If you discover a security issue please create an issue stating you've discovered a security
issue but don't divulge the issue, one of the maintainers will respond with an email address
you can send the details to. Once the issue has been patched the details can be made public.

If you wish to join the team please raise an issue and one of the maintainers will assess your
request.

## Tests

The test suite is located in the `test/` directory. All new features are
expected to have corresponding test cases with complete code coverage. Patches
that increase test coverage are happily accepted.

Ensure that the test suite passes by executing:

```bash
$ npm test
```

Ensure that lint passes
```bash
$ npm run lint
```

Some lint errors can be fixed with

```bash
npm run lintfix
```

Coverage reports can be generated and viewed by executing:

```bash
npm run coverage
```

The output in html form will be in `var/coverage`

Templates such as README.md can be updated via

```bash
npm run templates
```

If you are starting a new project run

```bash
npm run init-new-project
```
**WARNING** This will overwrite files which are listed in the `ignoreExisting` array of `templates/variables.js`
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Rowan Wookey <[email protected]>
Copyright (c) 2019 Rowan Wookey <[email protected]>
Copyright (c) 2011-2014 Jared Hanson

Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Loading

0 comments on commit 3b1120e

Please sign in to comment.