Skip to content

Commit 05d3194

Browse files
authored
Upgrading node-auth0 from v4 to v5 [beta] (#1207)
1 parent 4b2d31c commit 05d3194

File tree

119 files changed

+11475
-18604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+11475
-18604
lines changed

.circleci/config.yml

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ orbs:
66
jobs:
77
e2e_test_as_node_module:
88
docker:
9-
- image: cimg/node:22.4.1
9+
- image: cimg/node:22.12.0
1010
working_directory: ~/repo
1111
steps:
1212
- checkout
@@ -15,7 +15,7 @@ jobs:
1515

1616
e2e_test_as_cli:
1717
docker:
18-
- image: cimg/node:22.4.1
18+
- image: cimg/node:22.12.0
1919
working_directory: ~/repo
2020
steps:
2121
- checkout
@@ -66,9 +66,27 @@ jobs:
6666
name: Publish package
6767
command: npm publish
6868

69+
deploy_beta:
70+
parameters:
71+
v:
72+
type: string
73+
default: "lts"
74+
docker:
75+
- image: cimg/node:<< parameters.v >>
76+
working_directory: ~/repo
77+
steps:
78+
- attach_workspace:
79+
at: ~/repo
80+
- run:
81+
name: Authenticate with registry
82+
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
83+
- run:
84+
name: Publish beta package
85+
command: npm publish --tag beta
86+
6987
does_typescript_compile:
7088
docker:
71-
- image: cimg/node:22.4.1
89+
- image: cimg/node:22.12.0
7290
working_directory: ~/repo
7391
steps:
7492
- checkout
@@ -97,7 +115,7 @@ workflows:
97115
v: "lts"
98116
- unit_test:
99117
name: Unit tests with Node current
100-
v: "22.4.1"
118+
v: "22.12.0"
101119

102120
test_and_deploy:
103121
jobs:
@@ -118,6 +136,29 @@ workflows:
118136
branches:
119137
ignore: /.*/
120138
tags:
121-
only: /^v.*/
139+
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
140+
context:
141+
- publish-npm
142+
143+
test_and_deploy_beta:
144+
jobs:
145+
- unit_test:
146+
name: Unit tests with Node LTS (Beta)
147+
v: "lts"
148+
filters:
149+
branches:
150+
only: beta
151+
tags:
152+
only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
153+
- deploy_beta:
154+
name: Publish Beta to NPM
155+
v: "lts"
156+
requires:
157+
- Unit tests with Node LTS (Beta)
158+
filters:
159+
branches:
160+
ignore: /.*/
161+
tags:
162+
only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
122163
context:
123164
- publish-npm

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 69 deletions
This file was deleted.

eslint.config.js

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
const js = require('@eslint/js');
2+
const tsParser = require('@typescript-eslint/parser');
3+
const tsEslint = require('@typescript-eslint/eslint-plugin');
4+
const importPlugin = require('eslint-plugin-import');
5+
const globals = require('globals');
6+
const eslintConfigPrettier = require('eslint-config-prettier');
7+
8+
const baseRecommended = js.configs.recommended;
9+
10+
module.exports = [
11+
{
12+
ignores: [
13+
'coverage/**',
14+
'examples/**',
15+
'local/**',
16+
'node_modules/**',
17+
'lib/**',
18+
'test/e2e/testdata/**',
19+
'webpack/**',
20+
],
21+
},
22+
{
23+
...baseRecommended,
24+
files: ['**/*.{js,ts,cjs,mjs}'],
25+
linterOptions: {
26+
reportUnusedDisableDirectives: 'off',
27+
},
28+
languageOptions: {
29+
...(baseRecommended.languageOptions ?? {}),
30+
parser: tsParser,
31+
parserOptions: {
32+
...(baseRecommended.languageOptions?.parserOptions ?? {}),
33+
ecmaVersion: 2020,
34+
sourceType: 'module',
35+
},
36+
globals: {
37+
...(baseRecommended.languageOptions?.globals ?? {}),
38+
...globals.es2020,
39+
...globals.node,
40+
...globals.mocha,
41+
},
42+
},
43+
plugins: {
44+
...(baseRecommended.plugins ?? {}),
45+
import: importPlugin,
46+
'@typescript-eslint': tsEslint,
47+
},
48+
settings: {
49+
'import/resolver': {
50+
node: {
51+
extensions: ['.js', '.ts', '.mjs', '.cjs'],
52+
},
53+
},
54+
},
55+
rules: {
56+
...(baseRecommended.rules ?? {}),
57+
'max-len': 'off',
58+
'class-methods-use-this': 'off',
59+
'comma-dangle': 'off',
60+
'eol-last': ['error', 'always'],
61+
indent: [
62+
'error',
63+
2,
64+
{
65+
SwitchCase: 1,
66+
},
67+
],
68+
'import/no-extraneous-dependencies': [
69+
'error',
70+
{
71+
devDependencies: true,
72+
},
73+
],
74+
'import/no-dynamic-require': 'off',
75+
'prefer-arrow-callback': 'off',
76+
'object-shorthand': 'off',
77+
'prefer-template': 'off',
78+
'func-names': 'off',
79+
'new-cap': 'off',
80+
'no-await-in-loop': 'off',
81+
'no-param-reassign': 'off',
82+
'no-multiple-empty-lines': [
83+
'error',
84+
{
85+
max: 1,
86+
maxEOF: 0,
87+
},
88+
],
89+
'no-plusplus': 'off',
90+
'no-extra-boolean-cast': 'off',
91+
'no-useless-escape': 'off',
92+
'no-redeclare': 'off',
93+
'no-unused-vars': 'off',
94+
'@typescript-eslint/no-unused-vars': [
95+
'error',
96+
{
97+
argsIgnorePattern: '^_',
98+
varsIgnorePattern: '^_',
99+
caughtErrors: 'none',
100+
ignoreRestSiblings: true,
101+
},
102+
],
103+
'@typescript-eslint/no-redeclare': 'off',
104+
'@typescript-eslint/no-explicit-any': 'off',
105+
'no-var': 'off',
106+
'object-curly-spacing': ['error', 'always'],
107+
quotes: [
108+
'error',
109+
'single',
110+
{
111+
avoidEscape: true,
112+
},
113+
],
114+
semi: ['error', 'always'],
115+
strict: 'off',
116+
'space-before-blocks': ['error', 'always'],
117+
'import/extensions': [
118+
'error',
119+
'ignorePackages',
120+
{
121+
js: 'never',
122+
ts: 'never',
123+
mjs: 'never',
124+
cjs: 'never',
125+
},
126+
],
127+
},
128+
},
129+
eslintConfigPrettier,
130+
];

0 commit comments

Comments
 (0)