Use CSS-in-JavaScript with themes for React without being tightly coupled to one implementation
A React component to execute a function whenever you scroll to an element.
Manage multiple event handlers using few event listeners
Hey there 👋
I've created the types for https://github.com/airbnb/polyglot.js/pull/171
Have a look here: https://github.com/DefinitelyTyped/DefinitelyTyped/compare/master...Xiphe:DefinitelyTyped:node-polyglot-custom-replace
Let me know when you plan to release this, so that I can open the PR
Thanks for your patience, I just published v2.5.0
Oh yeah, for sure using the JSDoc type annotations is a worthwhile option. However, they are not as expressive as the TypeScript annotations, so we prefer to use the TypeScript syntax wherever possible. Also, we use TypeScript syntax everywhere else, and it is nice to have consistency in our codebase.
I think the kind of change I'm proposing in this PR will help people who prefer to use the TypeScript syntax everywhere instead of the JSDoc annotations without having to stumble into a big performance penalty. Helping to ensure that Jest is fast by default for everyone is a good goal IMO.
I'm terribly sorry but I don't think I understand what you are asking. Can you please clarify?
We run the type checking outside of the critical path for our tooling. This gives us the safety of TypeScript without slowing down our tools very much.
In CI this means that we have a job that is dedicated to run type checking for the whole repo. Also TypeScript will give you feedback in editor as you are iterating on the config.
In this setup, having type checking run as part of the start up process of another tool is unnecessary and redundant.
It looks like there are some tests that expect for type checking to be running here. I'm happy to remove those tests if we want to go in this direction, just let me know!
Use transpileOnly for ts-node register
This will skip running TypeScript type checks when loading config files, and will just remove the TypeScript annotations so the code can be read by node directly. This makes Jest startup much more efficient.
Documentation:
https://typestrong.org/ts-node/docs/options/#transpileonly
This could be made even faster by adding the following config, which will use the much faster swc compiler to to the transpilation:
transpiler: 'ts-node/transpilers/swc-experimental'
However, that will require additional dependencies, so it should probably be done on an opt-in basis via a new configuration field, and I do not want to take that on at this time.
Fixes #11337
This will skip running TypeScript type checks when loading config files, and will just remove the TypeScript annotations so the code can be read by node directly. This makes Jest startup much more efficient.
Documentation:
https://typestrong.org/ts-node/docs/options/#transpileonly
This could be made even faster by adding the following config, which will use the much faster swc compiler to to the transpilation:
transpiler: 'ts-node/transpilers/swc-experimental'
However, that will require additional dependencies, so it should probably be done on an opt-in basis via a new configuration field, and I do not want to take that on at this time.
Fixes #11337
I'm relying on CI to verify this change, please let me know if you would like me to be more thorough.
Use transpileOnly for ts-node register
This will skip running TypeScript type checks when loading config files, and will just remove the TypeScript annotations so the code can be read by node directly. This makes Jest startup much more efficient.
Documentation:
https://typestrong.org/ts-node/docs/options/#transpileonly
This could be made even faster by adding the following config, which will use the much faster swc compiler to to the transpilation:
transpiler: 'ts-node/transpilers/swc-experimental'
However, that will require additional dependencies, so it should probably be done on an opt-in basis via a new configuration field, and I do not want to take that on at this time.
Fixes #11337
fix: Incorrect detection of open ZLIB handles (#12022)
Docs: docs/CodeTransformation.md (typo fix) (#12017)
Correcting mockClear api docs (#12019)
Replaced module with namespace (#12018)
fix(docs): add missing table of contents to The Jest Object documentation page (#12039)
Do not reset global.document before CustomElement:disconnectedCallbac… (#11871)
Do not reset global.document before CustomElement:disconnectedCallback has finished running, document should be accessible in this callback function
Update CHANGELOG.md
Co-authored-by: dalvarezmartinez1 example@example.com Co-authored-by: Simen Bekkhus sbekkhus91@gmail.com
Remove cycle in printDiffs, diffLines and joinAlignedDiffs (#10818)
chore: fix PnP test by forcing older version of typescript
replaced substr
with substring
(#12066)
fix(jest-config): add missing slash dependency (#12080)
docs(jest-matcher-utils): fix link (#12072)
chore(jest-runner): Add info regarding timers to forceExited message (#12083)
README.md: HTTP => HTTPS (#12063)
Removed explicit type declarations (#12038)
docs: alphabetize cli options (#11586)
docs: changed 'before' and 'after' ---> 'beforeAll' and 'afterAll' (#12065)
Add types
entry in export map (#12073)
Enhancing the toHaveProperty
matcher to support array selection (#12092)
fix: avoid unhandled promise rejections when concurrent tests fail (#11987)
docs: Clarify setupFiles run order (#11641)
@trim21 We use some code like the following in our eslint config to make TypeScript work:
// Allow importing typescript files.
process.env.TS_NODE_PROJECT = require.resolve('../typescript/tsconfig.scripts.json');
require('ts-node').register({
transpileOnly: true,
// This requires @swc/core or @swc/wasm and @swc/helpers to be installed
transpiler: 'ts-node/transpilers/swc-experimental',
});
Add in scroll-padding properties to default whitelist
The scroll-padding property has wide support and is in a stable Candidate Recommendation stage: it would be great to add it to the default whitelist. https://caniuse.com/?search=scroll-padding
it same like as PR #988 for scroll-margin
.
please review this PR 🙏
This plugin currently only matches rules that have extensions of .js, .cjs, and .mjs, which means that if you want to write your rules using TypeScript, they will not be found.
To support this, I am adding the .ts, .cts, and .mts extensions to the set of extensions to match on in the rules dir. Now that the list of extensions has grown to six, it seems appropriate to additionally do a small refactoring to move the list of supported extensions to a Set that can be checked at once instead of repeatedly calling .endsWith
.
I also added package-lock.json to the .gitignore file, since it appeared when I was getting this repo set up and it seems appropriate to mark it as an ignored file so it does not get accidentally committed later on.
Fixes #7
I noticed these while reading some of the command-line-reference docs and thought it would be helpful to update them.
Similar to #14941