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

migration-assistant - initial commit #4249

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
574 changes: 559 additions & 15 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions packages/migration-assistant-nextjs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
extends: ['@clerk/custom/browser', '@clerk/custom/typescript', '@clerk/custom/jest', '@clerk/custom/react'],
rules: {
'import/no-unresolved': ['error', { ignore: ['^#'] }],
'turbo/no-undeclared-env-vars': ['error', { allowList: ['__NEXT_ROUTER_BASEPATH'] }],
},
overrides: [
{
files: ['./src/client-boundary/NextOptionsContext.tsx'],
rules: {
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
},
},
],
};
65 changes: 65 additions & 0 deletions packages/migration-assistant-nextjs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env.local

# Distribution directories
dist/
.next

# Mac OSX files
.DS_Store
21 changes: 21 additions & 0 deletions packages/migration-assistant-nextjs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Clerk, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
69 changes: 69 additions & 0 deletions packages/migration-assistant-nextjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<p align="center">
<a href="https://clerk.com?utm_source=github&utm_medium=clerk_migration_assistant" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://images.clerk.com/static/logo-dark-mode-400x400.png">
<img src="https://images.clerk.com/static/logo-light-mode-400x400.png" height="64">
</picture>
</a>
<br />
<h1 align="center">@clerk/migration-assistant-nextjs</h1>
</p>

<div align="center">

[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://clerk.com/discord)

[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.com/docs?utm_source=github&utm_medium=clerk_migration_assistant)

[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)

[Changelog](https://github.com/clerk/javascript/blob/main/packages/migration-assistant/CHANGELOG.md)
·
[Report a Bug](https://github.com/clerk/javascript/issues/new?assignees=&labels=needs-triage&projects=&template=BUG_REPORT.yml)
·
[Request a Feature](https://feedback.clerk.com/roadmap)
·
[Get help](https://clerk.com/contact/support?utm_source=github&utm_medium=clerk_migration_assistant)

</div>

## Getting Started

[Clerk](https://clerk.com/?utm_source=github&utm_medium=clerk_nextjs) is the easiest way to add authentication and user management to your Next.js application. Add sign up, sign in, and profile management to your application in minutes.

### Prerequisites

- Next.js 13.0.4 or later
- React 18 or later
- Node.js `>=18.17.0` or later
- An existing authentication provider (like Next-Auth, Supabase, etc.)
- An existing Clerk application. [Create your account for free](https://dashboard.clerk.com/sign-up?utm_source=github&utm_medium=clerk_nextjs).

## Usage

For further information, guides, and examples visit the [Clerk Migrations Assistant reference documentation](https://clerk.com/docs/references/nextjs/overview?utm_source=github&utm_medium=clerk_nextjs).

## Support

You can get in touch with us in any of the following ways:

- Join our official community [Discord server](https://clerk.com/discord)
- On [our support page](https://clerk.com/contact/support?utm_source=github&utm_medium=clerk_migration_assistant)

## Contributing

We're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md) and [code of conduct](https://github.com/clerk/javascript/blob/main/docs/CODE_OF_CONDUCT.md).

## Security

`@clerk/migration-assistant-nextjs` follows good practices of security, but 100% security cannot be assured.

`@clerk/migration-assistant-nextjs` is provided **"as is"** without any **warranty**. Use at your own risk.

_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerk/javascript/blob/main/docs/SECURITY.md)._

## License

This project is licensed under the **MIT license**.

See [LICENSE](https://github.com/clerk/javascript/blob/main/packages/migration-assistant/LICENSE) for more information.
3 changes: 3 additions & 0 deletions packages/migration-assistant-nextjs/package.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"sideEffects": false
}
9 changes: 9 additions & 0 deletions packages/migration-assistant-nextjs/package.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"sideEffects": false,
"imports": {
"#components": {
"react-server": "./components.server.js",
"default": "./components.client.js"
}
}
}
95 changes: 95 additions & 0 deletions packages/migration-assistant-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"name": "@clerk/migration-assistant-nextjs",
"version": "5.6.4",
"description": "Clerk SDK for NextJS",
"keywords": [
"clerk",
"typescript",
"nextjs",
"auth",
"authentication",
"passwordless",
"session",
"migration",
"jwt"
],
"homepage": "https://clerk.com/",
"bugs": {
"url": "https://github.com/clerk/javascript/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/clerk/javascript.git",
"directory": "packages/migration-assistant-nextjs"
},
"license": "MIT",
"author": "Clerk",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./server": {
"types": "./dist/types/server/index.d.ts",
"import": "./dist/esm/server/index.js",
"require": "./dist/cjs/server/index.js"
},
"./errors": {
"types": "./dist/types/errors.d.ts",
"import": "./dist/esm/errors.js",
"require": "./dist/cjs/errors.js"
},
"./internal": {
"types": "./dist/types/internal.d.ts",
"import": "./dist/esm/internal.js",
"require": "./dist/cjs/internal.js"
}
},
"types": "./dist/types/index.d.ts",
"files": [
"dist",
"server",
"errors"
],
"scripts": {
"build": "npm run clean && tsup",
"build:declarations": "tsc -p tsconfig.declarations.json",
"clean": "rimraf ./dist",
"dev": "tsup --watch",
"dev:publish": "npm run dev -- --env.publish",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"lint:attw": "attw --pack .",
"lint:publint": "publint",
"publish:local": "npx yalc push --replace --sig",
"test": "jest",
"test:cache:clear": "jest --clearCache --useStderr",
"test:ci": "jest --maxWorkers=70%"
},
"devDependencies": {
"@clerk/eslint-config-custom": "*",
"@types/crypto-js": "4.2.2",
"@types/node": "^18.19.33",
"@types/react": "*",
"@types/react-dom": "*",
"next": "^14.2.4",
"typescript": "*"
},
"peerDependencies": {
"next": "^13.5.4 || ^14.0.3 || >=15.0.0-rc",
"react": ">=18 || >=19.0.0-beta",
"react-dom": ">=18 || >=19.0.0-beta"
},
"engines": {
"node": ">=18.17.0"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@clerk/clerk-react": "^5.9.4",
"tslib": "2.4.1"
}
}
Loading
Loading