Skip to content

storybook__preact: Fix preact JSX parsing#37275

Closed
cortopy wants to merge 14 commits intoDefinitelyTyped:masterfrom
cortopy:patch-1
Closed

storybook__preact: Fix preact JSX parsing#37275
cortopy wants to merge 14 commits intoDefinitelyTyped:masterfrom
cortopy:patch-1

Conversation

@cortopy
Copy link
Contributor

@cortopy cortopy commented Jul 31, 2019

If using preact without preact-compat, there is an issue with JSX component parsing as per this issue preactjs/preact#1566

This PR fixes it

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • tslint.json should be present, and tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

If removing a declaration:

  • If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

UPDATE
After trying many dtslint combinations, I've made this PR microsoft/dtslint#240 in order to be able to configure a custom pragma

If using preact without preact-compat, there is an issue with JSX component parsing as per this issue preactjs/preact#1566

This PR fixes it
@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick performance metrics against master and your PR. This is still an experiment, so don’t panic if I say something crazy! I’m still learning how to interpret these metrics.

Let’s review the numbers, shall we?

Comparison details 📊
master #37275 diff
Batch compilation
Memory usage (MiB) 83.3 84.0 +0.9%
Type count 10326 10322 0.0%
Assignability cache size 34000 33972 -0.1%
Subtype cache size 0 0
Identity cache size 4 4 0.0%
Language service
Samples taken 99 99 0.0%
Identifiers in tests 99 99 0.0%
getCompletionsAtPosition
    Mean duration (ms) 380.3 381.4 +0.3%
    Median duration (ms) 380.1 380.0 0.0%
    Mean CV 15.3% 15.6% +1.7%
    Worst duration (ms) 456.1 487.6 +6.9%
    Worst identifier T forceReRender
getQuickInfoAtPosition
    Mean duration (ms) 361.5 364.9 +0.9%
    Median duration (ms) 359.9 361.4 +0.4%
    Mean CV 14.9% 16.0% +7.3%
    Worst duration (ms) 442.1 450.7 +1.9%
    Worst identifier T T

It looks like nothing changed too much. I’m pretty lenient since I’m still an experiment, so take a look anyways and make sure nothing looks out of place.


If you have any questions or comments about me, you can ping @andrewbranch. Have a nice day!

@typescript-bot
Copy link
Contributor

Updated numbers for you here from 1b1b879:

Comparison details 📊
master #37275 diff
Batch compilation
Memory usage (MiB) 83.3 79.7 -4.3%
Type count 10326 10322 0.0%
Assignability cache size 34000 33972 -0.1%
Subtype cache size 0 0
Identity cache size 4 4 0.0%
Language service
Samples taken 99 99 0.0%
Identifiers in tests 99 99 0.0%
getCompletionsAtPosition
    Mean duration (ms) 380.3 368.0 -3.2%
    Median duration (ms) 380.1 365.1 -3.9%
    Mean CV 15.3% 14.9% -3.0%
    Worst duration (ms) 456.1 454.5 -0.4%
    Worst identifier T T
getQuickInfoAtPosition
    Mean duration (ms) 361.5 348.0 -3.7%
    Median duration (ms) 359.9 344.9 -4.2%
    Mean CV 14.9% 15.5% +3.5%
    Worst duration (ms) 442.1 429.6 -2.8%
    Worst identifier T div
System information
Node version v10.16.0 v10.16.0
CPU count 2 2
CPU speed 2.397 GHz 2.394 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1047-azure 4.15.0-1047-azure

It looks like nothing changed too much. I’m pretty lenient since I’m still an experiment, so take a look anyways and make sure nothing looks out of place.

@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 31, 2019

@cortopy Thank you for submitting this PR!

Because this is a new definition, a DefinitelyTyped maintainer will be reviewing this PR in the next few days once the Travis CI build passes.

In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day!

@typescript-bot
Copy link
Contributor

@cortopy The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
Contributor

Updated numbers for you here from 935a75c:

Comparison details 📊
master #37275 diff
Batch compilation
Memory usage (MiB) 83.3 83.8 +0.6%
Type count 10326 10338 +0.1%
Assignability cache size 34000 33972 -0.1%
Subtype cache size 0 0
Identity cache size 4 4 0.0%
Language service
Samples taken 99 99 0.0%
Identifiers in tests 99 99 0.0%
getCompletionsAtPosition
    Mean duration (ms) 380.3 456.5 +20.0% 🔸
    Median duration (ms) 380.1 455.0 +19.7%
    Mean CV 15.3% 16.4% +6.9%
    Worst duration (ms) 456.1 549.6 +20.5% 🔸
    Worst identifier T addWithSideEffect
getQuickInfoAtPosition
    Mean duration (ms) 361.5 430.3 +19.0%
    Median duration (ms) 359.9 430.1 +19.5%
    Mean CV 14.9% 18.0% +20.2%
    Worst duration (ms) 442.1 510.7 +15.5%
    Worst identifier T addWithSideEffect
System information
Node version v10.16.0 v10.16.0
CPU count 2 2
CPU speed 2.397 GHz 2.294 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1047-azure 4.15.0-1047-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

Looks like there were a couple significant differences—take a look at mean duration for getting completions at a position and worst-case duration for getting completions at a position to make sure everything looks ok.

@typescript-bot
Copy link
Contributor

Updated numbers for you here from 2d96164:

Comparison details 📊
master #37275 diff
Batch compilation
Memory usage (MiB) 83.3 72.3 -13.2%
Type count 10326 10338 +0.1%
Assignability cache size 34000 33972 -0.1%
Subtype cache size 0 0
Identity cache size 4 4 0.0%
Language service
Samples taken 99 99 0.0%
Identifiers in tests 99 99 0.0%
getCompletionsAtPosition
    Mean duration (ms) 380.3 393.2 +3.4%
    Median duration (ms) 380.1 385.1 +1.3%
    Mean CV 15.3% 16.4% +6.8%
    Worst duration (ms) 456.1 479.7 +5.2%
    Worst identifier T RenderFunction
getQuickInfoAtPosition
    Mean duration (ms) 361.5 389.6 +7.8%
    Median duration (ms) 359.9 388.7 +8.0%
    Mean CV 14.9% 17.0% +14.0%
    Worst duration (ms) 442.1 489.2 +10.7%
    Worst identifier T Story

It looks like nothing changed too much. I’m pretty lenient since I’m still an experiment, so take a look anyways and make sure nothing looks out of place.

@typescript-bot typescript-bot added New Definition This PR creates a new definition package. Awaiting reviewer feedback and removed The Travis CI build failed labels Jul 31, 2019
@typescript-bot
Copy link
Contributor

@cortopy The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
Contributor

Updated numbers for you here from 140abee:

Comparison details 📊
master #37275 diff
Batch compilation
Memory usage (MiB) 79.8 82.8 +3.7%
Type count 10326 10338 +0.1%
Assignability cache size 34000 33972 -0.1%
Subtype cache size 0 0
Identity cache size 4 4 0.0%
Language service
Samples taken 99 99 0.0%
Identifiers in tests 99 99 0.0%
getCompletionsAtPosition
    Mean duration (ms) 389.7 367.7 -5.7%
    Median duration (ms) 386.7 364.4 -5.8%
    Mean CV 13.9% 15.9% +14.7%
    Worst duration (ms) 490.0 482.7 -1.5%
    Worst identifier T Story
getQuickInfoAtPosition
    Mean duration (ms) 367.7 352.0 -4.3%
    Median duration (ms) 366.2 345.9 -5.5%
    Mean CV 14.1% 16.4% +15.8%
    Worst duration (ms) 460.3 458.2 -0.5%
    Worst identifier render addWithSideEffect
System information
Node version v10.16.0 v10.16.0
CPU count 2 2
CPU speed 2.397 GHz 2.294 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1047-azure 4.15.0-1047-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

It looks like nothing changed too much. I’m pretty lenient since I’m still an experiment, so take a look anyways and make sure nothing looks out of place.

@typescript-bot
Copy link
Contributor

typescript-bot commented Aug 1, 2019

@cortopy The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
Contributor

Updated numbers for you here from 8dfa022:

Comparison details 📊
master #37275 diff
Batch compilation
Memory usage (MiB) 78.8 72.7 -7.8%
Type count 10400 10416 +0.2%
Assignability cache size 34005 34012 0.0%
Subtype cache size 0 0
Identity cache size 4 4 0.0%
Language service
Samples taken 99 99 0.0%
Identifiers in tests 99 99 0.0%
getCompletionsAtPosition
    Mean duration (ms) 394.7 353.9 -10.3%
    Median duration (ms) 397.5 355.5 -10.5%
    Mean CV 14.2% 15.2% +7.2%
    Worst duration (ms) 467.1 432.8 -7.3%
    Worst identifier T render
getQuickInfoAtPosition
    Mean duration (ms) 370.6 340.4 -8.2%
    Median duration (ms) 369.3 340.5 -7.8%
    Mean CV 14.9% 15.7% +5.6%
    Worst duration (ms) 465.6 398.4 -14.4%
    Worst identifier Story addWithSideEffect

It looks like nothing changed too much. I’m pretty lenient since I’m still an experiment, so take a look anyways and make sure nothing looks out of place.

@typescript-bot
Copy link
Contributor

typescript-bot commented Aug 4, 2019

@cortopy The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@cortopy cortopy closed this Aug 6, 2019
@cortopy cortopy deleted the patch-1 branch August 6, 2019 08:15
sandersn pushed a commit to microsoft/dtslint that referenced this pull request Aug 6, 2019
Not all type definitions use `React.createElement` as the jsx pragma. I bumped into this issue when updating `storybook__preact` types as per DefinitelyTyped/DefinitelyTyped#37275

By adding the compiler option `jsxFactory` other pragmas can be used in type definitions
sandersn pushed a commit to microsoft/DefinitelyTyped-tools that referenced this pull request Nov 29, 2021
Not all type definitions use `React.createElement` as the jsx pragma. I bumped into this issue when updating `storybook__preact` types as per DefinitelyTyped/DefinitelyTyped#37275

By adding the compiler option `jsxFactory` other pragmas can be used in type definitions
sandersn added a commit to microsoft/DefinitelyTyped-tools that referenced this pull request Dec 1, 2021
* 0.6.2 - update dependencies

* 0.7.0 - log performance data to disk

* Fix lint x(

* 0.7.1 - Update dependencies

* 0.7.2 - Update dts-critic dependency

* 0.7.3 - update dts-critic dependency

* Resolve localTs path (#229)

* 0.7.4 - call path.resolve on tsLocal path

* 0.7.5 - support TS 3.6

* 0.7.6 roll back to definitelytyped-header-parser 1.1

* 0.7.7 - support TS 3.6 again

* Actually change to 0.7.7

* Fix banned words check and update dts-critic (#236)

* Fix banned words check and update dts-critic

1. Update to dts-critic 1.2, which no longer requires project urls to
include the homepage url specified on npm.
2. Check for banned words for all packages, not just those complex
enough to have a package.json. The location of the check was wrong.

* Remove handling for project url mismatch from npm-naming

* 0.7.7: Fix banned-words check and update dts-critic

* forbid only whole-word 'download'

previously it was any substring.

* 0.7.9 - fix forbidden-word regex for 'download'

* Show TS version in ExpectType error (#237)

I didn't add a test because tslint doesn't support baselines with
newlines in them. It works locally, though.

* 0.8.0: Add TS version to ExpectType errors

* Add CODEOWNERS so PRs ping me

* 0.9 - npm-naming:require d.ts to match npm version

* Update checks.ts (#240)

Not all type definitions use `React.createElement` as the jsx pragma. I bumped into this issue when updating `storybook__preact` types as per DefinitelyTyped/DefinitelyTyped#37275

By adding the compiler option `jsxFactory` other pragmas can be used in type definitions

* 0.9.1 - Update @types/node dependency; allow jsxFactory

* Add documentation about localTs and expectOnly option (#244)

* Add documentation about localTs and expectOnly option

* Update `--expectOnly` description

According to microsoft/dtslint#244 (comment)

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Remove long series of empty lines in tool output (#247)

* 0.9.2 - remove bogus newlines+better documentation

Thanks to @IvonGoncharov and @lukyth, respectively.

* Use prepublishOnly instead of made-up do-publish

* ExpectRule creates cache dir (#248)

This is important for users that always use --localTs, which means that
they never run the code that creates the cache directory as part of
installing old versions of typescript.

* 0.9.4 - stop crashing after an initial --localTs run

* 0.9.4 - Add TS3.7 support

* dt-header-parser 3.7.1

* 0.9.5 - definitelytyped-header-parser 3.7.1

* 0.9.6 - dt-header-parser 3.7.2

The 3.7 parser that actually contains 3.7!

* Point ExpectRule users to tsd in README

* Merge pull request #250 from microsoft/multipleExpectTypes

Support $ExpectType with || separating multiple choices

* 0.9.7 - ExpectType supports multiples, sep by ||

* 0.9.8 - update dts-critic dependency

* Fix typo in readme (#251) (#252)

* 0.9.9 - Update dts-critic dependency

* Add support for 3.8 via definitelytyped-header-parser

* Revert to 3.7 definitelytyped-header-parser

* really revert to 3.7

* Add npm-naming documentation

* even more documentation

* unused-dependencies (#261)

* Support TS 3.8

* Drop support for 2.0 2.7 (#264)

* Switch to supported versions of Typescript

I still need to update package-lock.json when I install the shipping
version of definitelytyped-header-parser.

* Upgrade definitelytyped-header-parser

Also fix some lint

* 2.0: stop testing on Typescript 2.0 - 2.7

* Update dts-critic to 2.2.2

* Update dts-critic to 2.2.3

* 2.0.3 - update dtslint and definitelytyped-header-parser

* Support “Minimum” in TS version line (#265)

* 2.0.4 - support "Minimum" in TS version line

* Fix regex typo (#266)

* 2.0.5 - fix Typescript version parsing regex

* Remove unused 'request' dependency (#268)

Maybe I'm missing something but I don't see why it was added in
microsoft/dtslint@3c57139

* 2.0.6 - remove request dependency

* Update npm naming (#269)

* Update npm-naming for new dts-critic

* Remove logs

* Fix tslint errors

* Update node version

* Update docs

* fixes

* Update npm-naming for new dts-critic

* Remove logs

* Fix tslint errors

* Update node version

* Update docs

* fixes

* 3.0 - new version of dts-critic

* Support Node 10 (#272)

* Tslint updater (#274)

* Create tslint updater

* Small fixes

* Adjustments

* Fixes

* Fix jsons

* Explicitly install dependencies

* Add script explanation

* Refactor

* 3.1.0 - turn on dts-critic rules

* 3.2.0 - update definitelytyped-header-parser to TS3.9

* Add support for lint suggestions (#276)

* Support suggestions

* Refactor

* Fix lint errors

* Remove export and add comment

* Refactor

* feat: Disallow `"strict": false` (#277)

* Use TypeScriptVersion.latest instead of "next" (#279)

* Convert latest TS version to "next" on DT

dtslint installs the latest version of typescript as "next" because
that's the npm name.

Probably a better fix is to install typescript@next into a directory
with the same name as the rest, stripping off the .0-dev.20200323 part.

* Just install typescript@next into 3.9 folder

This removes the need to change the name when testing dependencies. I'm
not sure yet about when testing the main package.

* Remove "next" from TsVersion type

Instead, just use TYpeScriptVersion.latest everywhere except when
installing from npm.

* Update TS and fix new compile error

* 3.4 - only use "next" to install from npm

* fix lint

* Merge pull request #280 from microsoft/fixDosPathComparison

Fix issue with path comparison for typesVersions on Windows file systems

* Support parallel minor versions (#282)

* [package] Use latest typescript@next

* Support parallel minor versions.

* 3.4.1 - allow v0.xx packages in one more place

* 3.4.2 - update dts-critic dependency

* Update to 4.0, deprecate 2.8 (#287)

* Update to 4.0, deprecate 2.8

Also switch from definitelytyped-header-parser to
@definitelytyped/header-parser,
@definitelytyped/typescript-versions,
@definitelytyped/utils.

This brings a couple of updates, principally a new way of tracking which
TS versions have shipped under the "latest" tag vs shipped under the
"next" tag. dtslint tests *only* versions that have shipped under
"latest", plus whatever is *currently* shipping under "next". It doesn't
test any betas or RCs.

Note that the new dependencies are currently closed source. We're
waiting on the MS open source legal office to OK the new repos.

* make range handle latest correctly

* reindent tsconfig

* fix lint

* Merge pull request #289 from microsoft/bug/wait-for-installation

Ensure TypeScript is installed before starting

* Lint

* 3.5.1

* 3.5.2

* 3.6 - update dependencies to support shipped TS3.9

* 3.6.1 - update to fixed header-parser

* 3.6.2 - update dts-critic (with fixed header-parser)

* 3.6.3 - update dts-critic

Bugfixes for dts-critic.

* 3.6.4 - update dts-critic dependency

should make dtslint-runner not run out of space

* Use latest @DefinitelyTyped packages to ensure same version as DefinitelyTyped

* 3.6.5

* Update tuple rule for new AST

* 3.6.6

* Merge pull request #292 from microsoft/disable-failing-custom-lint-rules

Disable failing custom lint rules

* 3.6.7

* Disable no-redundant-jsdoc-2 (#294)

It is also broken on typescript@next

* 3.6.8 - disable another failing lint rule

* Update and re-enable tslint rules (#296)

1. Update to dts-critic and @definitelytyped/definitions-parser that use
peerDeps for typescript.
2. Specify dts-critic@latest instead of a specific version.
3. Re-enable the disabled lint rules.

* 3.6.9 - update dependencies, re-enable lint rules

* chore(deps): Move `typescript` to `peerDependencies` (#295)

* 3.6.10 - move TS to peer dep

* 3.6.11 - update dts-critic dependency

* 3.6.12 - update dts-critic dependency

* Merge pull request #301 from microsoft/jsdoc-deprecated-support

Adds a rough approximation of deprecated support

* Merge pull request #302 from microsoft/auto_deploy

Add auto-deploy deploy step

* Check should deploy

* Use main

* Use the right name

* Fix lint, add CI

* Rename CI

* Merge pull request #303 from microsoft/deprecated_allow

Allow JSDoc deprecated anywhere

* 3.7.0 - update for TS 4.1 support

* update package-lock

* Flip typesVersions (#306)

* Flip typesVersions

1. Update @DefinitelyTyped dependencies
2. Simplify+invert runTests

* account for Minimum TS version in ts* directories

* ❤️ lint

* maxVersion: narrow type to removed undefined from first param

* go back to latest of @DefinitelyTyped packages

* 4.0.0 - flip order of typesVersions

Order typesVersions old-to-new, not new-to-old. Also put newest version
in the root, with older versions in ts* subdirectories.

* 4.0.1 - deprecate Typescript 3.1

* 4.0.2 - fixes from @definitelytyped/*

* Add @see tag (#310)

* Add support for @see tag

Also fix no-redundant-jsdoc2 test. It was not testing anything before.

* Move test to correctly named folder

* 4.0.3 - update @DefinitelyTyped dependencies

* 4.0.4 - track import dependencies as well

* 4.0.5 - update @definitelytyped/* and dts-critic

Adds support for 4.2 now that 4.1 is in RC.

* 4.0.6 - Update @definitelytyped/* and dtslint

1. Ship TS 4.1
2. Deprecate TS 3.2

* Fix package when installed using pnpm (#222)

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Merge pull request #319 from microsoft/tell_npm_instructions

Adds a message telling you to npm install when there's missing deps

* Merge pull request #320 from microsoft/vbump

Version bump and remove travis

* Update jsdoc tags + housekeeping + ts-ignore fix (#324)

1. Update package-lock, including dts-critic' npm@7 fixes
2. Don't forbid ts-ignore or tslint:disable inside node_modules
3. Allow or disallow a bunch of new JSDoc tags.

* 4.0.8 - upgrade no-redundant-jsdoc-2 + fix ts-ignore

* use eslint on this repo (#318)

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Merge pull request #321 from OliverJAsh/patch-1

Allow `noUncheckedIndexedAccess`

* Merge pull request #317 from jablko/patch-7

Copy advice from the DT common mistakes

* Merge pull request #327 from microsoft/update_node_Types

Update node types

* update to latest @DefinitelyTyped+dts-critic

* Update @DefinitelyTyped+dts-critic

* Version bump to 4.1.0 to workaround npm-should-deploy-action bug

* Disable no-redundant-undefined rule (#336)

It is going to turn into redundant-undefined soon, but in the meantime I
need to turn off the rule so that I can switch DT from complying with
no-redundant-undefined to complying with redundant-undefined.

* 4.1.1 - disable no-redundant-undefined

* no-redundant-undefined: enforce `undefined` for optional parameters (#335)

* make optional properties require undefined

* rename to redundant-undefined

* add missed no-redundant-undefined references

* add fix for missing undefined

* improve fix to handle function types

* Remove checks on properties

Including undefined, or not, is now semantically meaningful when
exactOptionalPropertyTypes is true.

* 4.1.2 - turn on redundant-undefined

Now only optional parameters are required to omit undefined. Optional
properties may include or not include it.

* Allow pre-1.0 /v* subdirectories. (#338)

Does not allow arbitrary minor versions, only 0.*
Matches #723

Fixes #333

* 4.1.3 - allow pre-1.0 /v* subdirectories

* fix(no-single-declare-module): allow single wildcard module declaration (#339)

* Remove 'external module' wording from rules (#340)

The term now is just 'module'. I improved the wording while I was here.

* 4.1.3 - Improve no-single-module rule

- Allow single *.ext modules
- Remove 'external module' wording

* 4.1.5 - update @DefinitelyTyped + dts-critic depenendencies

Add support for TS 4.5
Remove support for TS 3.6

* 4.1.6 - update @DefinitelyTyped + dts-critic depenendencies

* Sync README tsconfig.json with dts-gen template (#345)

* Add concurrency explanation -> FAQ (#343)

* Add concurrency explanation -> FAQ

* Update typescript-installs FAQ

* Merge pull request #346 from microsoft/weswigham-patch-1

Allow package.json files to specify imports/exports/type

* 4.2.0

* Fix typo in tsconfig.json example (#347)

* 4.2.1 - update @DefinitelyTyped and dts-critic dependencies

* Initial commit

* Create README.md

* Initial version

* Add jest (and yargs)

* Working on npm retrieval now

* Basic checking is done

* Improve error handling on the command-line

* Update README and add DT runner

* Add check to dtsCritic. Oops!

* Some minor improvements to index.js

* Changes to DT tester

Plus more normalisation in the core critic

* Add fixer to one Definitely Typed error

It's not a very good fixer.

* Unmangle scoped package names for npm lookup

* Work with non-npm packages

* Correct error code and allow current squatters

They get an explicit check.
Also update readme to explain the new check.

* Bring tests back up to date

* Add author field to package.json

* Correct JSON format in package.json

* Add index.d.ts

* Improve error wording

* Bump package.json to 1.0.2

* Update definitelytyped-header-parser dependency

* Update/publish new npm version

* Update definitelytyped-header-parser

* Update missed tests

* Read source text

Also switch to download-file-sync, and just download files
synchronously. This simplifies the code considerably.

* Error on unmatched 'export default'

* Cleanup

* Fixes to checkNames feature

1. Update dt.js to fix errors from checkNames
2. Handle scoped names in checkNames.
3. Better predicate in checkNames.

* Create ignore list for export default

* Add geojson to list of squatters

See DefinitelyTyped/DefinitelyTyped#33850 for
discussion on how the owners decided to allow this change.

* Print source when `export default` rule fails.

I'm pretty sure unpkg fails some of the time and I don't know what is in
stdout when it does.

* Update package.json for 1.0.5 (and lock)

* Merge pull request #4 from sandersn/do-not-fail-on-500

Do not error for 500 or 524 errors

* 1.0.6 - no error for 5xx errors

* Merge pull request #5 from wooorm/fix-trailing-comma

Remove unneeded trailing comma

* 1.0.7 - remove trailing comma

* Use header version for querying unpkg.

If there is a dt header, use the version from the header to query unpkg
instead of just using the latest version on unpkg.

* 1.0.8 - fix:query unpkg with package version from header

* Couple of fixes

1. No error if types have `export default` AND `export =`. One package
had an incorrect export default in the comments, but correct code.
2. No error if the version specified in the header doesn't correspond to
a version on NPM. This is pretty common! I thought we checked for it.

* 1.0.9 - minor fixes

* 1.1 - add support for TS 3.6

* Update package.json to 1.1.0

* Merge pull request #6 from sandersn/stop-checking-project-url

Stop checking project URL.

* 1.2 : stop requiring project url and npm homepage url to be the same

* Merge pull request #8 from sandersn/require-matching-npm-version

Require matching npm version

* 2.0 - require d.ts to match npm version

* Merge pull request #9 from orta/curl_check

Adds a curl check on launch

* 2.1 - nice error if curl doesn't exist

* Skip Rate exceeded from unpkg too

* 2.2 - skip Rate exceeded from unpkg

* 2.2.1: Update deps + add to error message

* Increase curl buffer size

Some package.jsons were larger than 1 MB. Also remove dependency on
download-file-sync, replacing with a call to execFileSync that specifies
a 50MB buffer.

* Further increase curl buffer size

Turns out 50 MB is not enough. Use 100 MB instead.

* 2.2.3 - increase curl buffer size

* 2.2.4 - update definitelytyped-header-parser

* JS to TS (#14)

* Convert JS to TS

* Configure build and test gulp tasks

* Add eslint

* Fix eslint issues

* Minor fixes

* Update docs instructions

* Add typescript as dependency

* Fix tsconfig noEmit

* Fix gulp build

* Create nodejs.yml

* Merge pull request #16 from DefinitelyTyped/add-build-task

add build task

* Add new checks (#15)

* Create exports checking script

* Minor refactor

* Add new checks to index.ts.

* Rename file

* Minor fixes

* Fix test

* Add option to format result as json

* Update readme

* Nits

* Turn off js exports property check by default

* Fixes

* More nits

* Use enum

* Fixes

* Improve error messages

* More fixes

* More fixes

* Change dtsCritic options

* Change function and error names

* Add mode option to CLI and move some things

* Update readme

* Fixes (#17)

* Fixes

* Rename toExportErrorKind

* Make ErrorKind a string enum

* Path-related fixes

* Update index.ts and remove gulp

* 3.0 - use compiler to check d.ts + better source downloads

* Silence tar warnings

* 3.0.1 - silence tar warning output

* Add engines to package.json (#18)

* Add engines to package.json

* Use node 10.17

* Delete npm sources after usage

This prevents dtslint-runner's overnight run from running out of space
on Azure pipelines

* 3.0.2 - delete npm sources after running

* switch to @definitelytyped/header-parser

* 3.1.0 - update to new header-parser from @DefinitelyTyped

* 3.2.0 - update to 3.9 version of header-parser

* 3.2.1 - update to fixed header-parser

* update typescript to 3.9

* Merge pull request #28 from DefinitelyTyped/use-tmp-for-npm-downloads

Use tmp for npm downloads

* Merge pull request #29 from DefinitelyTyped/ignore-webpack-single-letter-properties

ignore webpack's single-letter properties

* 3.2.2 - use tmp, skip webpack properties

1. Use tmp instead of rimraf to make sure npm package downloads are deleted.
2. Do not report missing-property errors on webpack-emitted single-letter
capital variables.

* resume deleting source after a single run

* 3.2.3 - delete package source each time

It went back to running out of space -- I guess tmp dirs aren't deleted
soon enough.

* 3.2.4 - make typescript a peer dependency

* Merge pull request #31 from DefinitelyTyped/update-yargs-dep

Update yargs dependency

* 3.2.5 - update yargs dependency

* Merge pull request #32 from DefinitelyTyped/dont-squelch-tar-warnings-on-macos

Do not squelch tar warnings on macOS

* 3.2.6 - no tar warnings on macOS

* Merge pull request #34 from DefinitelyTyped/add-prepublish-script

Add prepublishOnly script

* 3.2.7 - actually update .js + add prepublish script

* 3.3.0 update to header-parser with 4.1 support

* 3.3.1: update to header-parser with 3.1 deprecated

* 3.3.2 - update @definitelytyped/header-parser dependency

* 3.3.3 - update @definitelytyped/header-parser for 4.2

* 3.3.4 - update @definitelytyped/header-parser for shipping 4.1

* Merge pull request #42 from DefinitelyTyped/check-stderr-too

Check stderr when stdout is empty

* 3.3.5 - work correctly with npm@7

* 3.3.6 - fix for npm pack on npm@7

* Update to latest header-parser

* 3.3.8 - update to latest header-parser

* 3.3.9 - update @definitelytyped/header-parser dependency

* true 3.3.9 - update @definitelytyped/header-parser

To the version that supports TS 4.5.

* 3.3.10 - update @definitelytyped/header-parser

* 3.3.11 -- update @definitelytyped/header-parser dependency

* Add dtslint and dts-critic to README

* Alter package.jsons and run 'yarn install'

* Post-package-import updates

1. Update some TS usage.
2. Depend on TS internals instead of tsutils for JSDoc.
3. Update name of dtsutil/dts-critic imports.

* Fix lint

Also improve regex for "No interfaces starting with I" so that it no
longer forbids I followed by a lowercase letter.

* Address PR comments

* remove trailing comma from dtslint/package.json

* update versions in new package.json

* fix internal dependency versions

Co-authored-by: Nicholas Jamieson <nicholas@cartant.com>
Co-authored-by: Juan J. Jimenez-Anca <cortopy@users.noreply.github.com>
Co-authored-by: Kanitkorn Sujautra <lukyth@users.noreply.github.com>
Co-authored-by: Ivan Goncharov <ivan.goncharov.ua@gmail.com>
Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
Co-authored-by: Travis Valenti <ennuuos@gmail.com>
Co-authored-by: PopGoesTheWza <32041843+PopGoesTheWza@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Gabriela Araujo Britto <gab@cin.ufpe.br>
Co-authored-by: Dominik Moritz <domoritz@gmail.com>
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
Co-authored-by: Orta Therox <ortam@microsoft.com>
Co-authored-by: Orta <git@orta.io>
Co-authored-by: James Garbutt <43081j@users.noreply.github.com>
Co-authored-by: Gautier Ben Aïm <48261497+GauBen@users.noreply.github.com>
Co-authored-by: Jack Bates <jack@nottheoilrig.com>
Co-authored-by: Wesley Wigham <wewigham@microsoft.com>
Co-authored-by: Andrew Luca <thendrluca@gmail.com>
Co-authored-by: Gabriela Araujo Britto <t-gaar@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Definition This PR creates a new definition package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants