-
-
Notifications
You must be signed in to change notification settings - Fork 83
Url utils TS migration setup #684
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0956135
Added TypeScript Dependencies
vershwal 2c002fb
Added tsconfig and updated package.json
vershwal f5d09e3
Moved Source Files to src/ Directory and added @ts-nocheck
vershwal 31ab697
Added .gitignore
vershwal f3d7a82
Configured ESLint to ignore linting errors for TypeScript files with …
vershwal 2f2e9d9
Changed outDir to lib instead of cjs
vershwal 353cbd0
Running lint on src and tests
vershwal 8045015
Updated the target to ES2022
vershwal 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 |
|---|---|---|
| @@ -1,6 +1,20 @@ | ||
| module.exports = { | ||
| plugins: ['ghost'], | ||
| extends: [ | ||
| 'plugin:ghost/node' | ||
| 'plugin:ghost/ts' | ||
| ], | ||
| overrides: [ | ||
| { | ||
| // Files with @ts-nocheck are intentionally not fully migrated yet | ||
| // Disable all linting rules that would fail on these files | ||
| files: ['**/*.ts'], | ||
| rules: { | ||
| '@typescript-eslint/ban-ts-comment': ['error', { | ||
| 'ts-nocheck': false | ||
| }], | ||
| '@typescript-eslint/no-var-requires': 'off', | ||
| 'prefer-const': 'off' | ||
| } | ||
| } | ||
| ] | ||
| }; |
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 @@ | ||
| lib/ |
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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| module.exports = require('./lib/UrlUtils'); | ||
|
|
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
1 change: 1 addition & 0 deletions
1
packages/url-utils/lib/UrlUtils.js → packages/url-utils/src/UrlUtils.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
1 change: 1 addition & 0 deletions
1
...l-utils/lib/utils/absolute-to-relative.js → ...l-utils/src/utils/absolute-to-relative.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
1 change: 1 addition & 0 deletions
1
.../lib/utils/absolute-to-transform-ready.js → .../src/utils/absolute-to-transform-ready.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| const {URL} = require('url'); | ||
| const absoluteToRelative = require('./absolute-to-relative'); | ||
|
|
||
|
|
||
1 change: 1 addition & 0 deletions
1
...utils/lib/utils/build-early-exit-match.js → ...utils/src/utils/build-early-exit-match.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| function escapeRegExp(string) { | ||
| return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | ||
| } | ||
|
|
||
1 change: 1 addition & 0 deletions
1
...s/lib/utils/deduplicate-double-slashes.js → ...s/src/utils/deduplicate-double-slashes.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
1 change: 1 addition & 0 deletions
1
...ils/lib/utils/deduplicate-subdirectory.js → ...ils/src/utils/deduplicate-subdirectory.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| const {URL} = require('url'); | ||
|
|
||
| /** | ||
|
|
||
1 change: 1 addition & 0 deletions
1
...ls/lib/utils/html-absolute-to-relative.js → ...ls/src/utils/html-absolute-to-relative.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
1 change: 1 addition & 0 deletions
1
...utils/html-absolute-to-transform-ready.js → ...utils/html-absolute-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...ls/lib/utils/html-relative-to-absolute.js → ...ls/src/utils/html-relative-to-absolute.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
1 change: 1 addition & 0 deletions
1
...utils/html-relative-to-transform-ready.js → ...utils/html-relative-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...tils/lib/utils/html-to-transform-ready.js → ...tils/src/utils/html-to-transform-ready.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
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
1 change: 1 addition & 0 deletions
1
packages/url-utils/lib/utils/index.js → packages/url-utils/src/utils/index.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
1 change: 1 addition & 0 deletions
1
packages/url-utils/lib/utils/is-ssl.js → packages/url-utils/src/utils/is-ssl.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
1 change: 1 addition & 0 deletions
1
...lib/utils/lexical-absolute-to-relative.js → ...src/utils/lexical-absolute-to-relative.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
1 change: 1 addition & 0 deletions
1
...ls/lexical-absolute-to-transform-ready.js → ...ls/lexical-absolute-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...lib/utils/lexical-relative-to-absolute.js → ...src/utils/lexical-relative-to-absolute.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
1 change: 1 addition & 0 deletions
1
...ls/lexical-relative-to-transform-ready.js → ...ls/lexical-relative-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...s/lib/utils/lexical-to-transform-ready.js → ...s/src/utils/lexical-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
.../url-utils/lib/utils/lexical-transform.js → .../url-utils/src/utils/lexical-transform.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| const _ = require('lodash'); | ||
|
|
||
| // options.transformMap = { | ||
|
|
||
1 change: 1 addition & 0 deletions
1
...ib/utils/markdown-absolute-to-relative.js → ...rc/utils/markdown-absolute-to-relative.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
1 change: 1 addition & 0 deletions
1
...s/markdown-absolute-to-transform-ready.js → ...s/markdown-absolute-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...ib/utils/markdown-relative-to-absolute.js → ...rc/utils/markdown-relative-to-absolute.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
1 change: 1 addition & 0 deletions
1
...s/markdown-relative-to-transform-ready.js → ...s/markdown-relative-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
.../lib/utils/markdown-to-transform-ready.js → .../src/utils/markdown-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...url-utils/lib/utils/markdown-transform.js → ...url-utils/src/utils/markdown-transform.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
1 change: 1 addition & 0 deletions
1
...b/utils/mobiledoc-absolute-to-relative.js → ...c/utils/mobiledoc-absolute-to-relative.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
1 change: 1 addition & 0 deletions
1
.../mobiledoc-absolute-to-transform-ready.js → .../mobiledoc-absolute-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...b/utils/mobiledoc-relative-to-absolute.js → ...c/utils/mobiledoc-relative-to-absolute.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
1 change: 1 addition & 0 deletions
1
.../mobiledoc-relative-to-transform-ready.js → .../mobiledoc-relative-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...lib/utils/mobiledoc-to-transform-ready.js → ...src/utils/mobiledoc-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...rl-utils/lib/utils/mobiledoc-transform.js → ...rl-utils/src/utils/mobiledoc-transform.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
1 change: 1 addition & 0 deletions
1
.../plaintext-absolute-to-transform-ready.js → .../plaintext-absolute-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
.../plaintext-relative-to-transform-ready.js → .../plaintext-relative-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...lib/utils/plaintext-to-transform-ready.js → ...src/utils/plaintext-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
...l-utils/lib/utils/relative-to-absolute.js → ...l-utils/src/utils/relative-to-absolute.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
1 change: 1 addition & 0 deletions
1
.../lib/utils/relative-to-transform-ready.js → .../src/utils/relative-to-transform-ready.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
1 change: 1 addition & 0 deletions
1
.../url-utils/lib/utils/replace-permalink.js → .../url-utils/src/utils/replace-permalink.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| const moment = require('moment-timezone'); | ||
|
|
||
| /** | ||
|
|
||
1 change: 1 addition & 0 deletions
1
...lib/utils/strip-subdirectory-from-path.js → ...src/utils/strip-subdirectory-from-path.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| const {URL} = require('url'); | ||
|
|
||
| /** | ||
|
|
||
1 change: 1 addition & 0 deletions
1
...url-utils/lib/utils/to-transform-ready.js → ...url-utils/src/utils/to-transform-ready.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
1 change: 1 addition & 0 deletions
1
.../lib/utils/transform-ready-to-absolute.js → .../src/utils/transform-ready-to-absolute.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| function escapeRegExp(string) { | ||
| return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | ||
| } | ||
|
|
||
1 change: 1 addition & 0 deletions
1
.../lib/utils/transform-ready-to-relative.js → .../src/utils/transform-ready-to-relative.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| function escapeRegExp(string) { | ||
| return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | ||
| } | ||
|
|
||
1 change: 1 addition & 0 deletions
1
packages/url-utils/lib/utils/url-join.js → packages/url-utils/src/utils/url-join.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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // @ts-nocheck | ||
| const deduplicateSubdirectory = require('./deduplicate-subdirectory'); | ||
|
|
||
| /** urlJoin | ||
|
|
||
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,16 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "target": "ES2022", | ||
| "module": "CommonJS", | ||
| "moduleResolution": "node", | ||
| "outDir": "./lib", | ||
| "rootDir": "./src", | ||
| "declaration": true, | ||
| "esModuleInterop": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "strict": true, | ||
| "skipLibCheck": true | ||
| }, | ||
| "include": ["src"] | ||
| } | ||
|
|
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
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.