Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: monorepo 1 #3804

Merged
merged 13 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/labeler.yml
Expand Up @@ -3,27 +3,28 @@ test:
- types/tests/**/*

providers:
- src/providers/**/*
- packages/next-auth/src/providers/**/*
- test/integration/**/*

adapters:
- src/adapters/**/*

databases:
- test/docker/databases/**/*
- test/fixtures/**/*
- packages/next-auth/src/adapters.ts
- packages/*-adapter/**

core:
- src/**/*
- packages/next-auth/src/**/*

style:
- src/css/**/*
- packages/next-auth/src/css/**/*

client:
- src/client/**/*
- packages/next-auth/src/client/**/*
- packages/next-auth/src/react/**/*

pages:
- src/server/pages/**/*
- packages/next-auth/src/core/pages/**/*

TypeScript:
- types/**/*
- packages/next-auth/src/**/types.ts

docs:
- packages/docs/docs/**/*
File renamed without changes.
Expand Up @@ -3,7 +3,10 @@ const path = require("path")
const core = require("@actions/core")

try {
const packageJSONPath = path.join(process.cwd(), "package.json")
const packageJSONPath = path.join(
process.cwd(),
"packages/next-auth/package.json"
)
const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, "utf8"))

const sha8 = process.env.GITHUB_SHA.substr(0, 8)
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Build
run: npm run build
- name: Run tests
run: npm test -- --coverage --verbose
run: npm run test -- -- --coverage --verbose
- name: Coverage
uses: codecov/codecov-action@v1
with:
Expand All @@ -47,7 +47,9 @@ jobs:
- name: Dependencies
uses: bahmutov/npm-install@v1
- name: Publish to npm and GitHub
run: npx semantic-release@17
run: |
cd packages/next-auth
npx semantic-release@17
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -67,12 +69,13 @@ jobs:
- name: Dependencies
uses: bahmutov/npm-install@v1
- name: Determine version
uses: ./config/version-pr
uses: ./.github/version-pr
id: determine-version
env:
PR_NUMBER: ${{ github.event.number }}
- name: Publish to npm
run: |
cd packages/next-auth
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm publish --access public --tag experimental
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -65,6 +65,6 @@ packages/dev-app/next-auth
/prisma/migrations

# Tests
/coverage
coverage

.turbo
17 changes: 0 additions & 17 deletions config/version-pr.js

This file was deleted.

3 changes: 0 additions & 3 deletions package.json
Expand Up @@ -5,9 +5,6 @@
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/react", "**/react/**", "**/react-dom", "**/react-dom/**"
]
},
"repository": "https://github.com/nextauthjs/next-auth.git",
Expand Down
15 changes: 0 additions & 15 deletions packages/dev-app/next.config.js
@@ -1,24 +1,9 @@
const path = require("path")

module.exports = {
webpack(config) {
config.experiments = {
...config.experiments,
topLevelAwait: true,
}
config.resolve = {
...config.resolve,
alias: {
...config.resolve.alias,
react: path.join(process.cwd(), "node_modules/react"),
nodemailer: path.join(process.cwd(), "node_modules/nodemailer"),
"react-dom": path.join(process.cwd(), "node_modules/react-dom"),
"react/jsx-dev-runtime": path.join(
process.cwd(),
"node_modules/react/jsx-dev-runtime"
),
},
}

return config
},
Expand Down
70 changes: 70 additions & 0 deletions packages/docs/.gitignore
@@ -0,0 +1,70 @@
# Misc
.DS_Store

.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

yarn.lock

# Dependencies
node_modules

# Build dirs
.next
/build
/dist
/build

# Generated files
.docusaurus
.cache-loader
providers.json
/internals
/providers
/types/providers/*
!types/providers/index.d.ts
!types/providers/email.d.ts
!types/providers/credentials.d.ts
!types/providers/oauth.d.ts
/adapters.d.ts
/adapters.js
/client.d.ts
/client.js
/index.d.ts
/index.js
/jwt.d.ts
/jwt.js
/errors.js
/errors.d.ts
/react.js
/react.d.ts

# Development app
app/next-auth
app/dist/css
app/package-lock.json
app/yarn.lock
app/prisma/migrations
app/prisma/dev.db*

# VS
/.vs/slnx.sqlite-journal
/.vs/slnx.sqlite
/.vs

# GitHub Actions runner
/actions-runner
/_work

# Prisma migrations
/prisma/migrations

# Tests
/coverage
76 changes: 76 additions & 0 deletions packages/docs/CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting me@iaincollins.com. All complaints will be reviewed and
investigated and will result in a response that is deemed necessary and
appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
26 changes: 26 additions & 0 deletions packages/docs/CONTRIBUTING.md
@@ -0,0 +1,26 @@
# Contributing guide

Contributions and feedback on your experience of using this software are welcome.

This includes bug reports, feature requests, ideas, pull requests, and examples of how you have used this software.

Please see the [Code of Conduct](CODE_OF_CONDUCT.md) and follow any templates configured in GitHub when reporting bugs, requesting enhancements, or contributing code.

Please raise any significant new functionality or breaking change an issue for discussion before raising a Pull Request for it.

## For contributors

Anyone can be a contributor. Either you found a typo, or you have an awesome feature request you could implement, we encourage you to create a Pull Request.

### Pull Requests

- The latest changes are always in `main`, so please make your Pull Request against that branch.
- Pull Requests should be raised for any change

### Setting up local environment

The local environment can be setup by doing the following.

1. Clone the repository `$ git clone https://github.com/nextauthjs/docs.git`
2. Install dependencies `$ npm install`
3. Start development server `$ npm start`
67 changes: 67 additions & 0 deletions packages/docs/README.md
@@ -0,0 +1,67 @@
<p align="center">
<br/>
<a href="https://next-auth.js.org" target="_blank"><img width="150px" src="https://next-auth.js.org/img/logo/logo-sm.png" /></a>
<h3 align="center">NextAuth.js</h3>
<p align="center">Authentication for Next.js</p>
<p align="center">
Open Source. Full Stack. Own Your Data.
</p>
<p align="center" style="align: center;">
<a href="https://github.com/nextauthjs/next-auth/actions/workflows/release.yml?query=workflow%3ARelease">
<img src="https://github.com/nextauthjs/next-auth/actions/workflows/release.yml/badge.svg" alt="Release" />
</a>
<a href="https://bundlephobia.com/result?p=next-auth">
<img src="https://img.shields.io/bundlephobia/minzip/next-auth" alt="Bundle Size"/>
</a>
<a href="https://www.npmtrends.com/next-auth">
<img src="https://img.shields.io/npm/dm/next-auth" alt="Downloads" />
</a>
<a href="https://github.com/nextauthjs/next-auth/stargazers">
<img src="https://img.shields.io/github/stars/nextauthjs/next-auth" alt="Github Stars" />
</a>
<a href="https://www.npmjs.com/package/next-auth">
<img src="https://img.shields.io/github/v/release/nextauthjs/next-auth?label=latest" alt="Github Stable Release" />
</a>
<img src="https://img.shields.io/github/v/release/nextauthjs/next-auth?include_prereleases&label=prerelease&sort=semver" alt="Github Prelease" />
</p>
</p>

## Overview

This is the repository for the documentation page for NextAuth.js!

NextAuth.js is a complete open source authentication solution for [Next.js](http://nextjs.org/) applications.

This documentation site is based on the [Docusaurus](https://docusaurus.io) framework.

## Getting Started

To start a local environment of this project, please do the following.

1. Clone the repository.

```bash
$ git clone https://github.com/nextauthjs/docs.git
```

2. Install dependencies

```bash
$ npm install
```

3. Start the development server

```bash
$ npm start
```

And thats all! Now you should have a local copy of this docs site running at [localhost:3000](http://localhost:3000)!

## Contributing

We're open to all community contributions! If you'd like to contribute in any way, please first read our [Contributing Guide](https://github.com/nextauthjs/next-auth/blob/main/CONTRIBUTING.md).

## License

ISC