-
-
Notifications
You must be signed in to change notification settings - Fork 200
TypeScript-as-JSDoc and updates #269
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
18 commits
Select commit
Hold shift + click to select a range
6559329
chore: lint, update devDeps, fix TS; fixes #114 ; closes #113 ; close…
brettz9 4a1c2a4
chore: update build files
brettz9 6b26f3c
fix: pass `subs` for `evalMemberExpression` `evalAst`
brettz9 692a4e8
fix: add @overload set for returning JSONPathClass only
brettz9 7f649aa
chore: fix/add package.json scripts
brettz9 73e48c4
chore: update devDeps.
brettz9 61acd37
chore: avoid including build files
brettz9 e27111b
fix regression with hasArrExpr being added
brettz9 aa0964f
fix: preserve explicit null overrides in evaluate options
brettz9 2b6afdf
fix: throw when new JSONPath would unwrap a scalar
brettz9 ab2b278
fix: preserve prototype compatibility surface
brettz9 b41ce03
fix: avoid node:vm in non-Node file
brettz9 74e35b0
fix: restore TypeScript compatibility for exported JSONPath types
brettz9 73f0972
fix: update docs
brettz9 ab0e654
add build-docs to prepublish script
brettz9 127d9cd
test: cover regressions
brettz9 77ff91a
fix: make JavaScript types compatible with TypeScript 7
brettz9 55ee3c9
fix: overcome TS bug with multiline typedefs ending with pipe symbols
brettz9 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
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 |
|---|---|---|
|
|
@@ -9,3 +9,4 @@ reports | |
| target | ||
| *.log | ||
| coverage | ||
| xunit.xml | ||
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,8 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = { | ||
| reject: [ | ||
| // Until typedoc supports | ||
| 'typescript' | ||
| ] | ||
| }; |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,8 @@ | ||
| { | ||
| "extends": "../tsconfig.json", | ||
| "compilerOptions": { | ||
| "lib": ["es2024", "dom"] | ||
| }, | ||
| "include": ["."], | ||
| "exclude": ["node-import-test.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 |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| import '../src/jsonpath.d.ts' | ||
| import type { JSONPathType } from 'jsonpath-plus'; | ||
| import type {JSONPathClass} from 'jsonpath-plus'; | ||
|
|
||
| declare global { | ||
| var LZString: { | ||
| decompressFromEncodedURIComponent: (value: string) => string; | ||
| compressToEncodedURIComponent: (value: string) => string; | ||
| }; | ||
| var JSONPath: { | ||
| JSONPath: JSONPathType | ||
| JSONPath: typeof JSONPathClass | ||
| } | ||
| } |
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,22 @@ | ||
| export type AssignmentExpression = any; | ||
| export type Substitution = any; | ||
| export type AnyParameter = any; | ||
| export type Substitutions = Record<string, Substitution>; | ||
| /** | ||
| * A replacement for NodeJS' VM.Script which is also {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | Content Security Policy} friendly. | ||
| */ | ||
| export class SafeScript { | ||
| /** | ||
| * @param {string} expr Expression to evaluate | ||
| */ | ||
| constructor(expr: string); | ||
| code: string; | ||
| ast: unknown; | ||
| /** | ||
| * @param {object} context Object whose items will be added | ||
| * to evaluation | ||
| * @returns {EvaluatedResult} Result of evaluated code | ||
| */ | ||
| runInNewContext(context: object): EvaluatedResult; | ||
| } | ||
| import type { EvaluatedResult } from './jsonpath.js'; |
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.