-
-
Notifications
You must be signed in to change notification settings - Fork 33
feat(tls-create-secure-pair-deprecation): handle Node.js DEP0064 migration #266
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
Open
technologic-technologic
wants to merge
15
commits into
nodejs:main
Choose a base branch
from
technologic-technologic:feat(`tls-createSecurePair-deprecation`)
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5f2d37f
feat(createSecurePair-deprecation): handle Node.js DEP0064 migration
technologic-technologic 60e516e
fix: updated 'tls-createsecurepair-to-socket' to a kebab-case complia…
technologic-technologic 505e9f1
Merge branch 'main' into feat(`tls-createSecurePair-deprecation`)
AugustinMauroy 697778b
docs(`tls-createSecurePair-deprecation`): switch to diff examples; ad…
technologic-technologic cecef62
chore(deps): update lockfile
technologic-technologic c88d036
feat(`tls-createSecurePair-deprecation`): modify workflow logic (incl…
technologic-technologic 5aca91e
test(`tls-createSecurePair-deprecation`): cover ESM default import an…
technologic-technologic ad2fa9f
Merge remote-tracking branch 'origin/feat(`tls-createSecurePair-depre…
technologic-technologic 7993e8b
Merge branch 'main' into pr/266
AugustinMauroy bc480f6
WIP
AugustinMauroy da7d3c8
Update workflow.ts
AugustinMauroy c7b610f
Update package-lock.json
AugustinMauroy 02bc9ae
simplify
AugustinMauroy 26c1af5
Update workflow.ts
AugustinMauroy da6a021
use `is`
AugustinMauroy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| # `tls.createSecurePair` deprecation DEP0064 | ||
|
|
||
| This recipe transforms the usage from the deprecated `createSecurePair()` to `TLSSocket()`. | ||
|
|
||
| See [DEP0064](https://nodejs.org/api/deprecations.html#dep0064-tlscreatesecurepair). | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Case 1: Basic `createSecurePair` usage | ||
|
|
||
| **Before:** | ||
| ```js | ||
| const { createSecurePair } = require('node:tls'); | ||
|
|
||
| const pair = createSecurePair(credentials); | ||
| ``` | ||
|
|
||
| **After:** | ||
| ```js | ||
| const { TLSSocket } = require('node:tls'); | ||
|
|
||
| const socket = new TLSSocket(underlyingSocket, { secureContext: credentials }); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### Case 2: Namespace import | ||
|
|
||
| **Before:** | ||
| ```js | ||
| const tls = require('node:tls'); | ||
|
|
||
| const pair = tls.createSecurePair(credentials); | ||
| ``` | ||
|
|
||
| **After:** | ||
| ```js | ||
| const tls = require('node:tls'); | ||
|
|
||
| const socket = new tls.TLSSocket(underlyingSocket, { secureContext: credentials }); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### Case 3: With server context | ||
|
|
||
| **Before:** | ||
| ```js | ||
| const { createSecurePair } = require('node:tls'); | ||
|
|
||
| const pair = createSecurePair(credentials, true, true, false); | ||
| ``` | ||
|
|
||
| **After:** | ||
| ```js | ||
| const { TLSSocket } = require('node:tls'); | ||
|
|
||
| const socket = new TLSSocket(underlyingSocket, { | ||
| secureContext: credentials, | ||
| isServer: true, | ||
| requestCert: true, | ||
| rejectUnauthorized: false | ||
| }); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### Case 4: ESM import | ||
|
|
||
| **Before:** | ||
| ```js | ||
| import { createSecurePair } from 'node:tls'; | ||
|
|
||
| const pair = createSecurePair(credentials); | ||
| ``` | ||
|
|
||
| **After:** | ||
| ```js | ||
| import { TLSSocket } from 'node:tls'; | ||
|
|
||
| const socket = new TLSSocket(underlyingSocket, { secureContext: credentials }); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### Case 5: ESM namespace import | ||
|
|
||
| **Before:** | ||
| ```js | ||
| import * as tls from 'node:tls'; | ||
|
|
||
| const pair = tls.createSecurePair(credentials); | ||
| ``` | ||
|
|
||
| **After:** | ||
| ```js | ||
| import * as tls from 'node:tls'; | ||
|
|
||
| const socket = new tls.TLSSocket(underlyingSocket, { secureContext: credentials }); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ### Case 6: Mixed usage with other TLS functions | ||
|
|
||
| **Before:** | ||
| ```js | ||
| const { createSecurePair, createServer } = require('node:tls'); | ||
|
|
||
| const pair = createSecurePair(credentials); | ||
| const server = createServer(options); | ||
| ``` | ||
|
|
||
| **After:** | ||
| ```js | ||
| const { TLSSocket, createServer } = require('node:tls'); | ||
|
|
||
| const socket = new TLSSocket(underlyingSocket, { secureContext: credentials }); | ||
| const server = createServer(options); | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| schema_version: "1.0" | ||
| name: "@nodejs/tls-create-secure-pair-to-tls-socket" | ||
| version: 1.0.0 | ||
| description: Handle DEP0064 by transforming `createSecurePair` to `TLSSocket` | ||
| author: Leonardo Trevizo | ||
| license: MIT | ||
| workflow: workflow.yaml | ||
| category: migration | ||
|
|
||
| targets: | ||
| languages: | ||
| - javascript | ||
| - typescript | ||
|
|
||
| keywords: | ||
| - transformation | ||
| - migration | ||
| - tls | ||
| - createSecurePair | ||
| - TLSSocket | ||
|
|
||
| registry: | ||
| access: public | ||
| visibility: public |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "name": "@nodejs/tls-create-secure-pair-to-tls-socket", | ||
| "version": "1.0.0", | ||
| "description": "Handle DEP0064 replacing `tls.createSecurePair()` with `tls.TLSSocket()`", | ||
| "type": "module", | ||
| "scripts": { | ||
| "test": "npx codemod jssg test -l typescript ./src/workflow.ts ./" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/nodejs/userland-migrations.git", | ||
| "directory": "recipes/tls-create-secure-pair-to-tls-socket", | ||
| "bugs": "https://github.com/nodejs/userland-migrations/issues" | ||
| }, | ||
| "author": "Leo Trevizo", | ||
| "license": "MIT", | ||
| "homepage": "https://github.com/nodejs/userland-migrations/blob/main/recipes/tls-create-secure-pair-to-tls-socket/README.md", | ||
| "devDependencies": { | ||
| "@codemod.com/jssg-types": "^1.0.9" | ||
| }, | ||
| "dependencies": { | ||
| "@nodejs/codemod-utils": "*" | ||
| } | ||
| } |
172 changes: 172 additions & 0 deletions
172
recipes/tls-create-secure-pair-to-tls-socket/src/workflow.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,172 @@ | ||
| import type { SgRoot, SgNode, Edit } from '@codemod.com/jssg-types/main'; | ||
| import type JS from '@codemod.com/jssg-types/langs/javascript'; | ||
| import { getNodeImportStatements } from '@nodejs/codemod-utils/ast-grep/import-statement'; | ||
| import { getNodeRequireCalls } from '@nodejs/codemod-utils/ast-grep/require-call'; | ||
| import { resolveBindingPath } from '@nodejs/codemod-utils/ast-grep/resolve-binding-path'; | ||
|
|
||
| type CallSite = { call: SgNode<JS>; binding: string }; | ||
|
|
||
| export default function transform(root: SgRoot<JS>): string | null { | ||
| const rootNode = root.root(); | ||
| const tlsStmts = [ | ||
| ...getNodeImportStatements(root, 'node:tls'), | ||
| ...getNodeImportStatements(root, 'tls'), | ||
| ...getNodeRequireCalls(root, 'node:tls'), | ||
| ...getNodeRequireCalls(root, 'tls'), | ||
AugustinMauroy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ]; | ||
| if (tlsStmts.length === 0) return null; | ||
|
|
||
| const cspBindings = unique( | ||
| tlsStmts | ||
| .map(s => resolveBindingPath(s as unknown as SgNode<JS>, '$.createSecurePair')) | ||
| .filter(Boolean) as string[] | ||
| ); | ||
| if (cspBindings.length === 0) return null; | ||
|
|
||
| const callSites = findCreateSecurePairCalls(rootNode, cspBindings); | ||
| const edits: Edit[] = []; | ||
|
|
||
| for (const { call, binding } of callSites) { | ||
| const a = getText(call.getMatch('A')); | ||
| const b = getText(call.getMatch('B')); | ||
| const c = getText(call.getMatch('C')); | ||
| const d = getText(call.getMatch('D')); | ||
| const options = buildOptions(a, b, c, d); | ||
| const isNamespace = binding.includes('.'); | ||
| const replacement = isNamespace | ||
| ? `new ${binding.replace(/\.createSecurePair$/, '.TLSSocket')}(underlyingSocket, ${options})` | ||
| : `new TLSSocket(underlyingSocket, ${options})`; | ||
| edits.push(call.replace(replacement)); | ||
| } | ||
|
|
||
| edits.push(...renamePairAssignedVariables(rootNode, cspBindings)); | ||
| edits.push(...rewriteTlsImports(rootNode)); | ||
| if (edits.length === 0) return null; | ||
| return rootNode.commitEdits(edits); | ||
AugustinMauroy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| function findCreateSecurePairCalls(rootNode: SgNode<JS>, bindings: string[]): CallSite[] { | ||
| return bindings.flatMap(binding => | ||
| rootNode | ||
| .findAll({ | ||
| rule: { | ||
| any: [ | ||
| { pattern: `${binding}($A, $B, $C, $D)` }, | ||
| { pattern: `${binding}($A, $B, $C)` }, | ||
| { pattern: `${binding}($A, $B)` }, | ||
| { pattern: `${binding}($A)` }, | ||
| { pattern: `${binding}()` }, | ||
| ], | ||
| }, | ||
| }) | ||
| .map(n => ({ call: n as SgNode<JS>, binding })) | ||
| ); | ||
| } | ||
|
|
||
| function buildOptions(a?: string | null, b?: string | null, c?: string | null, d?: string | null): string { | ||
| const kv: string[] = []; | ||
| if (a) kv.push(`secureContext: ${a}`); | ||
| if (b) kv.push(`isServer: ${b}`); | ||
| if (c) kv.push(`requestCert: ${c}`); | ||
| if (d) kv.push(`rejectUnauthorized: ${d}`); | ||
AugustinMauroy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return `{ ${kv.join(', ')} }`; | ||
| } | ||
|
|
||
| function getText(node: SgNode<JS> | undefined): string | null { | ||
| const t = node?.text()?.trim(); | ||
| return t || null; | ||
| } | ||
AugustinMauroy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| function unique<T>(arr: T[]): T[] { | ||
| return Array.from(new Set(arr)); | ||
| } | ||
|
|
||
| function renamePairAssignedVariables(rootNode: SgNode<JS>, bindings: string[]): Edit[] { | ||
| const edits: Edit[] = []; | ||
| for (const binding of bindings) { | ||
| const decls = rootNode.findAll({ | ||
| rule: { | ||
| kind: 'variable_declarator', | ||
| has: { | ||
| field: 'value', | ||
| kind: 'call_expression', | ||
| pattern: `${binding}($$$ARGS)`, | ||
| }, | ||
| }, | ||
| }); | ||
| for (const decl of decls) { | ||
| const name = decl.field('name'); | ||
| if (name && name.kind() === 'identifier' && name.text() === 'pair') { | ||
| edits.push(name.replace('socket')); | ||
| } | ||
| } | ||
| } | ||
| return edits; | ||
AugustinMauroy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
|
|
||
| function rewriteTlsImports(rootNode: SgNode<JS>): Edit[] { | ||
AugustinMauroy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const edits: Edit[] = []; | ||
| const tlsStmts = rootNode.findAll({ | ||
| rule: { | ||
| any: [ | ||
| { pattern: `import $$ANY from 'tls'` }, | ||
| { pattern: `import $$ANY from 'node:tls'` }, | ||
| { pattern: `const $$ANY = require('tls')` }, | ||
| { pattern: `const $$ANY = require('node:tls')` }, | ||
| ], | ||
| }, | ||
AugustinMauroy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }); | ||
|
|
||
| for (const stmt of tlsStmts) { | ||
| const code = stmt.text(); | ||
| if (/\bimport\s+\*\s+as\s+\w+\s+from\s+['"](tls|node:tls)['"]/.test(code)) continue; | ||
AugustinMauroy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| const m = code.match( | ||
| /import\s+(?:(?<def>[\w$]+)\s*,\s*)?\{\s*(?<names>[^}]*)\s*\}\s*from\s*['"](tls|node:tls)['"]\s*;?/, | ||
| ); | ||
| if (m?.groups) { | ||
| const def = m.groups.def || ''; | ||
| const namesRaw = m.groups.names || ''; | ||
| const names = namesRaw | ||
| .split(',') | ||
| .map(s => s.trim()) | ||
| .filter(Boolean) | ||
| .map(s => s.replace(/\s+as\s+\w+$/, '')); | ||
|
|
||
| if (names.includes('createSecurePair')) { | ||
| const kept = Array.from( | ||
| new Set(names.filter(n => n !== 'createSecurePair').concat('TLSSocket')), | ||
| ); | ||
| const left = def ? `${def}, ` : ''; | ||
| const rebuilt = `import ${left}{ ${kept.join(', ')} } from 'node:tls';`; | ||
| edits.push(stmt.replace(rebuilt)); | ||
| continue; | ||
| } | ||
| } | ||
| } | ||
| { | ||
| const m = code.match( | ||
| /const\s*\{\s*(?<names>[^}]*)\s*\}\s*=\s*require\(\s*['"](tls|node:tls)['"]\s*\)\s*;?/, | ||
| ); | ||
| if (m?.groups) { | ||
| const namesRaw = m.groups.names || ''; | ||
| const names = namesRaw | ||
| .split(',') | ||
| .map(s => s.trim()) | ||
| .filter(Boolean); | ||
|
|
||
| if (names.includes('createSecurePair')) { | ||
| const kept = Array.from( | ||
| new Set(names.filter(n => n !== 'createSecurePair').concat('TLSSocket')), | ||
| ); | ||
| const src = /node:tls/.test(code) ? 'node:tls' : 'tls'; | ||
| const rebuilt = `const { ${kept.join(', ')} } = require('${src}');`; | ||
AugustinMauroy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| edits.push(stmt.replace(rebuilt)); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return edits; | ||
| } | ||
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/expected/cjs-destructured-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| const { TLSSocket } = require('node:tls'); | ||
| const socket = new TLSSocket(underlyingSocket, { secureContext: credentials }); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/expected/cjs-destructured-flags.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| const { TLSSocket } = require('node:tls'); | ||
| const socket = new TLSSocket(underlyingSocket, { secureContext: credentials, isServer: true, requestCert: true, rejectUnauthorized: false }); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/expected/cjs-namespace-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| const tls = require('node:tls'); | ||
| const socket = new tls.TLSSocket(underlyingSocket, { secureContext: credentials }); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/expected/esm-named-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| import { TLSSocket } from 'node:tls'; | ||
| const socket = new TLSSocket(underlyingSocket, { secureContext: credentials }); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/expected/esm-namespace-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| import * as tls from 'node:tls'; | ||
| const socket = new tls.TLSSocket(underlyingSocket, { secureContext: credentials }); |
3 changes: 3 additions & 0 deletions
3
recipes/tls-create-secure-pair-to-tls-socket/tests/expected/mixed-with-other-symbols.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| const { createServer, TLSSocket } = require('node:tls'); | ||
| const socket = new TLSSocket(underlyingSocket, { secureContext: credentials }); | ||
| const server = createServer(options); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/input/cjs-destructured-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| const { createSecurePair } = require('node:tls'); | ||
| const pair = createSecurePair(credentials); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/input/cjs-destructured-flags.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| const { createSecurePair } = require('node:tls'); | ||
| const pair = createSecurePair(credentials, true, true, false); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/input/cjs-namespace-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| const tls = require('node:tls'); | ||
| const pair = tls.createSecurePair(credentials); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/input/esm-named-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| import { createSecurePair } from 'node:tls'; | ||
| const pair = createSecurePair(credentials); |
2 changes: 2 additions & 0 deletions
2
recipes/tls-create-secure-pair-to-tls-socket/tests/input/esm-namespace-basic.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| import * as tls from 'node:tls'; | ||
| const pair = tls.createSecurePair(credentials); |
3 changes: 3 additions & 0 deletions
3
recipes/tls-create-secure-pair-to-tls-socket/tests/input/mixed-with-other-symbols.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| const { createSecurePair, createServer } = require('node:tls'); | ||
| const pair = createSecurePair(credentials); | ||
| const server = createServer(options); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.