repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
typeorm/typeorm
12,288
issue_to_patch
Unnecessary migrations generated with computed columns on MSSQL ### Issue description On Microsoft SQL Server, when a column in one table has the same name as a computed column in another table, generating a migration will always generate code dropping and re-creating the column in the first table, even when that col...
fix: scope computed-columns join to correct table in MSSQL schema query
## Summary - Fix the `sys.computed_columns` LEFT JOIN in `SqlServerQueryRunner` to include `OBJECT_NAME` and `OBJECT_SCHEMA_NAME` conditions - Without these, a regular column sharing its name with a computed column in another table was incorrectly identified as computed, generating unnecessary migrations on every syn...
5b06e85a34db147f8fbcfd4af74b4845ffe6c599
aa2db8afb51711385386cbfa40efbd46fa30e7ca
diff --git a/src/driver/sqlserver/SqlServerQueryRunner.ts b/src/driver/sqlserver/SqlServerQueryRunner.ts index 623662cd525..f4f6dda3a8f 100644 --- a/src/driver/sqlserver/SqlServerQueryRunner.ts +++ b/src/driver/sqlserver/SqlServerQueryRunner.ts @@ -3156,7 +3156,9 @@ export class SqlServerQueryRunner re...
[ "src/driver/sqlserver/SqlServerQueryRunner.ts", "test/functional/database-schema/generated-columns/mssql/entity/TableWithComputed.ts", "test/functional/database-schema/generated-columns/mssql/entity/TableWithRegular.ts" ]
[]
diff --git a/test/functional/database-schema/generated-columns/mssql/entity/TableWithComputed.ts b/test/functional/database-schema/generated-columns/mssql/entity/TableWithComputed.ts new file mode 100644 index 00000000000..de474719503 --- /dev/null +++ b/test/functional/database-schema/generated-columns/mssql/entity/Ta...
true
typeorm/typeorm
10,754
issue_to_patch
MongoDB aggregation cursor return type cannot be modified ### Issue description MongoDB aggregation cursor return type cannot be modified ### Expected Behavior Aggregate method's generic parameter allows modifying the expected return type of the call. ### Actual Behavior The generic is redundant and the cursor wi...
Propagate `aggregate` method's generic parameter to its returned cursor
Fixes #10702 ### Description of change This typing bug has been bugging me for months, pun not intended. 😅 Within the `MongoManager`, we pass down the `R` generic to the `AggregationCursor`, but in the `MongoRepository` we pass down `Entity` to the cursor which is incorrect. It nullifies the generic with...
45577df8b729697d8b49057657d0032d0e66ce77
0f2c81a95f48fd2c90b5cddfac2ec2be692d0435
diff --git a/src/repository/MongoRepository.ts b/src/repository/MongoRepository.ts index ac9f137f756..be3aaaef013 100644 --- a/src/repository/MongoRepository.ts +++ b/src/repository/MongoRepository.ts @@ -206,7 +206,7 @@ export class MongoRepository< aggregate<R = any>( pipeline: ObjectLiteral[], ...
[ "src/repository/MongoRepository.ts" ]
[]
true
typeorm/typeorm
12,420
issue_to_patch
JsonContains should allow arrays ### Issue description JsonContains should allow arrays ### Expected Behavior Currently, the JsonContains find operator in TypeORM only accepts objects (Record<string | number | symbol, unknown>). This makes it impossible to query JSONB columns that store arrays in PostgreSQL. Postg...
fix(find-options): allow array values in JsonContains
## Summary Fixes #11800. `JsonContains` constrained `T` to `Record<...>`, which forced users to pass arrays through `as any` even though Postgres `@>` accepts both object and array containment. Relax the constraint to also accept readonly arrays so jsonb columns that store arrays can be queried without the cast. ## T...
94409985628f1ac1952cda925d9617e5dc425987
1be57319033df6827fc51a308077dfe22569ed5d
diff --git a/docs/docs/working-with-entity-manager/3-find-options.md b/docs/docs/working-with-entity-manager/3-find-options.md index e2cd490496f..84cfcba1bde 100644 --- a/docs/docs/working-with-entity-manager/3-find-options.md +++ b/docs/docs/working-with-entity-manager/3-find-options.md @@ -549,6 +549,23 @@ will execu...
[ "docs/docs/working-with-entity-manager/3-find-options.md", "src/find-options/operator/JsonContains.ts", "src/query-builder/QueryBuilder.ts", "test/functional/find-options/json-contains-operator/entity/Item.ts", "test/functional/find-options/json-contains-operator/json-contains-operator.test.ts", "test/git...
[]
diff --git a/test/functional/find-options/json-contains-operator/entity/Item.ts b/test/functional/find-options/json-contains-operator/entity/Item.ts new file mode 100644 index 00000000000..b5cda4c6edc --- /dev/null +++ b/test/functional/find-options/json-contains-operator/entity/Item.ts @@ -0,0 +1,13 @@ +import { Colum...
true
typeorm/typeorm
12,344
issue_to_patch
`QueryBuilder`: `useIndex()`, `setLock(lockTables)` should escape indices and tables ## Summary Multiple SQL injection vectors in TypeORM's QueryBuilder string APIs. The high-level find options API (`.find()`, `.findOne()`) is properly defended, but the lower-level QueryBuilder has gaps. ### Finding 1: useIndex() — n...
fix(mysql)!: use index identifiers instead of raw SQL in `QB.useIndex()`
## Summary Fixes #12333. Replaces #12336 which was accidentally closed when the fork was deleted. User-provided identifiers passed to `useIndex()` and `setLock()` `lockTables` were interpolated directly into SQL strings without escaping, allowing SQL injection. ### Changes - **`useIndex()`**: Wrap the index name wi...
a4f26af73f68aceda1e7d3a2d2612b80749d29be
3a4efeba7bea3971bedbeb72ba8d7cf7c0b80012
diff --git a/docs/docs/releases/1.0/02-upgrading-from-0.3.md b/docs/docs/releases/1.0/02-upgrading-from-0.3.md index 1a0bb8362de..f7b7fd8b693 100644 --- a/docs/docs/releases/1.0/02-upgrading-from-0.3.md +++ b/docs/docs/releases/1.0/02-upgrading-from-0.3.md @@ -66,6 +66,18 @@ postCode: number If you need zero-padded ...
[ "docs/docs/releases/1.0/02-upgrading-from-0.3.md", "src/query-builder/QueryExpressionMap.ts", "src/query-builder/SelectQueryBuilder.ts", "test/functional/query-builder/select/query-builder-select.test.ts", "test/functional/query-builder/sql-injection/sql-injection.test.ts", "test/github-issues/10678/issue...
[ { "comment": "Possible edge case: using table paths (and similar for indices). Both tables and indices (basically any database object) can be referenced by a path: `\"SCHEMA\".\"MY_TABLE\"`.\n\nIMO this is not a blocker to merge, both of these functionalities (`useIndex`/`lockTables`) are almost never used.", ...
diff --git a/test/functional/query-builder/select/query-builder-select.test.ts b/test/functional/query-builder/select/query-builder-select.test.ts index 7148d37ff76..07d81ae107c 100644 --- a/test/functional/query-builder/select/query-builder-select.test.ts +++ b/test/functional/query-builder/select/query-builder-select...
true
typeorm/typeorm
12,483
issue_to_patch
chore(deps): bump the github-actions-official group with 3 updates
Bumps the github-actions-official group with 3 updates: [actions/github-script](https://github.com/actions/github-script), [github/codeql-action](https://github.com/github/codeql-action) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/github-script` from 8.0.0 to 9.0.0 <...
ac2ffc603415fc89c440e0eb5582065a49f6f608
9b296b71e175bb4ba632a52acef88f110f8f674c
diff --git a/.github/workflows/assign-milestone.yml b/.github/workflows/assign-milestone.yml index 30ab76e7511..68c914d8e95 100644 --- a/.github/workflows/assign-milestone.yml +++ b/.github/workflows/assign-milestone.yml @@ -14,7 +14,7 @@ jobs: issues: write pull-requests: write steps: - - uses:...
[ ".github/workflows/assign-milestone.yml", ".github/workflows/codeql.yml", ".github/workflows/tests.yml" ]
[]
true
typeorm/typeorm
12,484
issue_to_patch
chore(deps): bump the github-actions-third-party group with 3 updates
Bumps the github-actions-third-party group with 3 updates: [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action), [pnpm/action-setup](https://github.com/pnpm/action-setup) and [SonarSource/sonarqube-scan-action](https://github.com/sonarsource/sonarqube-scan-action). Updates `cloudflare/wrangler-a...
62948a3751b0d978ab854bf2f51c3453ff8b15b2
ef7c285c79626bc10434a893a7f0c97c2d440d36
diff --git a/.github/workflows/deploy-docs-cloudflare-pages.yml b/.github/workflows/deploy-docs-cloudflare-pages.yml index 747bdac2d11..149486ca6bc 100644 --- a/.github/workflows/deploy-docs-cloudflare-pages.yml +++ b/.github/workflows/deploy-docs-cloudflare-pages.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/chec...
[ ".github/workflows/deploy-docs-cloudflare-pages.yml", ".github/workflows/publish-package.yml", ".github/workflows/tests.yml" ]
[]
true
typeorm/typeorm
12,481
issue_to_patch
ci: pin all GitHub Actions to commit SHAs
<!-- 😀 Wonderful! Thank you for opening a pull request for TypeORM. Please fill in the information below to expedite the review and (hopefully) merge of your change. If unsure about something.. just do as best as you're able, or reach out through our community support channels! https://github.co...
9284c169b4cf0f7cfaa36c7e1321e9a148a6f3c7
f7aec4cbcdaacb293eb308e513a6af086d95d3b6
diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 5d602be159a..45900a1de27 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -17,9 +17,9 @@ inputs: runs: using: composite steps: - - uses: pnpm/action-setup@v5 + -...
[ ".github/actions/setup-node/action.yml", ".github/actions/upload-coverage/action.yml", ".github/dependabot.yml", ".github/workflows/assign-milestone.yml", ".github/workflows/codeql.yml", ".github/workflows/deploy-docs-cloudflare-pages.yml", ".github/workflows/mutation-test.yml", ".github/workflows/pre...
[]
true
typeorm/typeorm
12,436
issue_to_patch
fix(security): validate limit() in Update/SoftDelete query builders
<!-- 😀 Wonderful! Thank you for opening a pull request for TypeORM. Please fill in the information below to expedite the review and (hopefully) merge of your change. If unsure about something.. just do as best as you're able, or reach out through our community support channels! https://github.co...
ef34796f36c8e5185f1e635685afe636341953a1
69ffef1473a266a9b9f40502a305128bf0ff3b76
diff --git a/src/query-builder/QueryBuilder.ts b/src/query-builder/QueryBuilder.ts index 4c450707aea..90dddd2e966 100644 --- a/src/query-builder/QueryBuilder.ts +++ b/src/query-builder/QueryBuilder.ts @@ -1722,4 +1722,30 @@ export abstract class QueryBuilder<Entity extends ObjectLiteral> { } } ...
[ "src/query-builder/QueryBuilder.ts", "src/query-builder/SelectQueryBuilder.ts", "src/query-builder/SoftDeleteQueryBuilder.ts", "src/query-builder/UpdateQueryBuilder.ts", "test/functional/query-builder/sql-injection/sql-injection.test.ts" ]
[]
diff --git a/test/functional/query-builder/sql-injection/sql-injection.test.ts b/test/functional/query-builder/sql-injection/sql-injection.test.ts index 91238111505..b070b892115 100644 --- a/test/functional/query-builder/sql-injection/sql-injection.test.ts +++ b/test/functional/query-builder/sql-injection/sql-injection...
true
typeorm/typeorm
12,421
issue_to_patch
DeprecationWarning: Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0 ### Feature Description DeprecationWarning: Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an externa...
fix(postgres): execute remaining relation-load and persistence paths sequentially to avoid pg 8.19.0 deprecation
Fixes the remaining half of #12238 (pg 8.19.0 deprecation warning), following the same direction as #12105 but in driver-agnostic code paths. #12105 serialized the `PostgresQueryRunner` / `CockroachQueryRunner` metadata paths (`loadTables`, `clearDatabase`, `dropEnumTypes`). This PR addresses the relation-loading an...
ec28cc2aa2be95b93ed02fa0923c36bd72323506
5459622205432c16ecb85fa24a36649547d6d08f
diff --git a/src/persistence/EntityPersistExecutor.ts b/src/persistence/EntityPersistExecutor.ts index 6d31ab23deb..fd8db69592a 100644 --- a/src/persistence/EntityPersistExecutor.ts +++ b/src/persistence/EntityPersistExecutor.ts @@ -67,86 +67,97 @@ export class EntityPersistExecutor { const entitiesInChunk...
[ "src/persistence/EntityPersistExecutor.ts", "src/persistence/SubjectDatabaseEntityLoader.ts", "src/persistence/SubjectExecutor.ts", "src/query-builder/SelectQueryBuilder.ts", "src/query-builder/relation-id/RelationIdLoader.ts", "test/functional/persistence/pg-concurrent-query-deprecation/entity/Post.ts", ...
[]
diff --git a/test/functional/persistence/pg-concurrent-query-deprecation/entity/Post.ts b/test/functional/persistence/pg-concurrent-query-deprecation/entity/Post.ts new file mode 100644 index 00000000000..b70cd535975 --- /dev/null +++ b/test/functional/persistence/pg-concurrent-query-deprecation/entity/Post.ts @@ -0,0 ...
true
typeorm/typeorm
11,987
issue_to_patch
Strange behavior when using `limit` with relations (joins) **Issue type:** [ ] question [X] bug report [ ] feature request [ ] documentation issue **Database system/driver:** [ ] `cordova` [ ] `mongodb` [ ] `mssql` [ ] `mysql` / `mariadb` [ ] `oracle` [X] `postgres` [ ] `cockroachdb` [ ] `sqlite` [...
fix: fix up limit with joins
Close #3967 <!-- 😀 Wonderful! Thank you for opening a pull request for TypeORM. Please fill in the information below to expedite the review and (hopefully) merge of your change. If unsure about something.. just do as best as you're able, or reach out through our community support channels! ht...
24977e3dac6d5d471f73e60371cd54d8627de46c
a64b6ad2ee93230dbc500f5ddc7037df8f288222
diff --git a/src/query-builder/SelectQueryBuilder.ts b/src/query-builder/SelectQueryBuilder.ts index 41a5afba186..86bfb8ca68c 100644 --- a/src/query-builder/SelectQueryBuilder.ts +++ b/src/query-builder/SelectQueryBuilder.ts @@ -1533,9 +1533,8 @@ export class SelectQueryBuilder<Entity extends ObjectLiteral> /** ...
[ "src/query-builder/SelectQueryBuilder.ts", "test/functional/query-builder/join/entity/Photo.ts", "test/functional/query-builder/join/entity/User.ts", "test/functional/query-builder/join/query-builder-joins.test.ts" ]
[ { "comment": "<img src=\"https://www.qodo.ai/wp-content/uploads/2025/12/v2-action-required.svg\" height=\"20\" alt=\"Action required\">\n\n1\\. <b><i>limit(1)</i></b> test too weak <code>📎 Requirement gap</code> <code>✓ Correctness</code>\n\n<pre>\nThe new regression test uses <b><i>.limit(1)</i></b> and only ...
diff --git a/test/functional/query-builder/join/entity/Photo.ts b/test/functional/query-builder/join/entity/Photo.ts new file mode 100644 index 00000000000..2784e766112 --- /dev/null +++ b/test/functional/query-builder/join/entity/Photo.ts @@ -0,0 +1,19 @@ +import { + Column, + Entity, + ManyToOne, + Primar...
true
typeorm/typeorm
11,987
comment_to_fix
fix: fix up limit with joins
<img src="https://www.qodo.ai/wp-content/uploads/2025/12/v2-action-required.svg" height="20" alt="Action required"> 1\. <b><i>limit(1)</i></b> test too weak <code>📎 Requirement gap</code> <code>✓ Correctness</code> <pre> The new regression test uses <b><i>.limit(1)</i></b> and only validates a single returned entity...
24977e3dac6d5d471f73e60371cd54d8627de46c
a64b6ad2ee93230dbc500f5ddc7037df8f288222
diff --git a/test/functional/query-builder/join/query-builder-joins.test.ts b/test/functional/query-builder/join/query-builder-joins.test.ts index 8d3b33f9f7e..f10c10e5003 100644 --- a/test/functional/query-builder/join/query-builder-joins.test.ts +++ b/test/functional/query-builder/join/query-builder-joins.test.ts @@ ...
[ "test/functional/query-builder/join/query-builder-joins.test.ts" ]
[ { "comment": "<img src=\"https://www.qodo.ai/wp-content/uploads/2025/12/v2-action-required.svg\" height=\"20\" alt=\"Action required\">\n\n1\\. <b><i>limit(1)</i></b> test too weak <code>📎 Requirement gap</code> <code>✓ Correctness</code>\n\n<pre>\nThe new regression test uses <b><i>.limit(1)</i></b> and only ...
true
typeorm/typeorm
11,987
comment_to_fix
fix: fix up limit with joins
<img src="https://www.qodo.ai/wp-content/uploads/2025/12/v2-action-required.svg" height="20" alt="Action required"> 1\. Cacheid page collisions <code>🐞 Bug</code> <code>✓ Correctness</code> <pre> With joins, limit/offset now triggers the two-query pagination flow, which uses cache identifiers that are not unique per...
24977e3dac6d5d471f73e60371cd54d8627de46c
a64b6ad2ee93230dbc500f5ddc7037df8f288222
diff --git a/src/query-builder/SelectQueryBuilder.ts b/src/query-builder/SelectQueryBuilder.ts index 41a5afba186..86bfb8ca68c 100644 --- a/src/query-builder/SelectQueryBuilder.ts +++ b/src/query-builder/SelectQueryBuilder.ts @@ -1533,9 +1533,8 @@ export class SelectQueryBuilder<Entity extends ObjectLiteral> /** ...
[ "src/query-builder/SelectQueryBuilder.ts" ]
[ { "comment": "<img src=\"https://www.qodo.ai/wp-content/uploads/2025/12/v2-action-required.svg\" height=\"20\" alt=\"Action required\">\n\n1\\. Cacheid page collisions <code>🐞 Bug</code> <code>✓ Correctness</code>\n\n<pre>\nWith joins, limit/offset now triggers the two-query pagination flow, which uses cache i...
true
typeorm/typeorm
12,439
issue_to_patch
chore(deps): update all dependencies to their latest minor version
<!-- 😀 Wonderful! Thank you for opening a pull request for TypeORM. Please fill in the information below to expedite the review and (hopefully) merge of your change. If unsure about something.. just do as best as you're able, or reach out through our community support channels! https://github.co...
7e559d77c5a178157157bd60562d0a78feaf21f5
40ff4f3a28013204b1f23d3474d1ad6307caa909
diff --git a/docs/package.json b/docs/package.json index 1a25e24ee6a..23f0c41a75d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { - "name": "type-orm-docs", - "version": "0.0.0", + "name": "@typeorm/docs", + "version": "1.0.0", "private": true, "scripts": { "build": "docusaurus ...
[ "docs/package.json", "docs/pnpm-lock.yaml", "package.json", "pnpm-lock.yaml" ]
[]
true
typeorm/typeorm
12,442
issue_to_patch
chore(release): release 0.3.29
Release v0.3.29. ## Highlights ### Bug Fixes - **security:** validate `limit()` in Update/SoftDelete query builders (#12437) - **postgres:** execute queries sequentially to avoid pg 8.19.0 deprecation warning (#12105) - propagate schema and database to closure junction table (#12110) - prevent columns with `select: f...
0ac80921c249b37886c131546ca01ab851abe0fe
50f99d4b3b18675f368b4f9835a04b7619dcbc69
diff --git a/CHANGELOG.md b/CHANGELOG.md index 44193bf9d30..a85040d068e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +## [0.3.29](https://github.com/typeorm/typeorm/compare/0.3.28...0.3.29) (2026-05-08) + + +### Bug Fixes + +* add async to the method using setFindOptions() ([#10787](https://github.com/...
[ "CHANGELOG.md", "README.md", "package.json" ]
[]
true
typescript-cheatsheets/react
820
issue_to_patch
restructure menu
c276c58962abf0e45458cda46103836ea98d60ea
b8bd0375051b0ee792c4eeecb9e1096191265b03
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 757576413..a5ded6d2f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ We appreciate your interest in contributing to this project. Here are some core ## 📋 Core Principles -1. **We're All About Cheatsheets**: Our main goal is to provide concise...
[ "CONTRIBUTING.md", "README.md", "docs/advanced/index.md", "docs/advanced/misc-concerns.md", "docs/advanced/types-react-ap.md", "docs/advanced/utility-types.md", "docs/basic/getting-started/basic-type-examples.md", "docs/basic/getting-started/class-components.md", "docs/basic/getting-started/concurre...
[ { "comment": "Let's setup redirects here to not break links on the web", "path": "docs/basic/getting-started/basic-type-examples.md", "hunk": "@@ -91,7 +91,7 @@ export declare interface AppProps {\n childrenElement: React.JSX.Element; // A single React element\n style?: React.CSSProperties; // to pa...
true
typescript-cheatsheets/react
820
comment_to_fix
restructure menu
Let's setup redirects here to not break links on the web
c276c58962abf0e45458cda46103836ea98d60ea
b8bd0375051b0ee792c4eeecb9e1096191265b03
diff --git a/docs/basic/getting-started/basic-type-examples.md b/docs/basic/getting-started/basic-type-examples.md index a85df10f4..3ec4da51f 100644 --- a/docs/basic/getting-started/basic-type-examples.md +++ b/docs/basic/getting-started/basic-type-examples.md @@ -91,7 +91,7 @@ export declare interface AppProps { ch...
[ "docs/basic/getting-started/basic-type-examples.md" ]
[ { "comment": "Let's setup redirects here to not break links on the web", "path": "docs/basic/getting-started/basic-type-examples.md", "hunk": "@@ -91,7 +91,7 @@ export declare interface AppProps {\n childrenElement: React.JSX.Element; // A single React element\n style?: React.CSSProperties; // to pa...
true
typescript-cheatsheets/react
823
issue_to_patch
Add client redirect for moved patterns page
4f2591cf953c91f383525c64f9f34720d0eace5c
6e65ed7e611e057eb827da477081aa1c5c921603
diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 32fcaa440..289ef7d51 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -13,6 +13,38 @@ const config: Config = { projectName: "react-typescript-cheatsheet", organizationName: "typescript-cheatsheets", + ...
[ "website/docusaurus.config.ts", "website/package.json", "website/yarn.lock" ]
[]
true
typescript-cheatsheets/react
822
issue_to_patch
Format
fae0824223565e36da47eb955e5fb50844983a51
9db6394c35a2a069058a683218e6b0782b5a89ef
diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 27d2dae2b..000000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -*/node_modules -*.log diff --git a/.github/ISSUE_TEMPLATE/advanced-cheatsheet.md b/.github/ISSUE_TEMPLATE/advanced-cheatsheet.md deleted file mode 100644 index 659f19fa1..000...
[ ".dockerignore", ".github/ISSUE_TEMPLATE/advanced-cheatsheet.md", ".github/ISSUE_TEMPLATE/basic-cheatsheet.md", ".github/ISSUE_TEMPLATE/general-react-ts-question.md", ".github/ISSUE_TEMPLATE/hoc-cheatsheet.md", ".github/pull_request_template.md", ".github/stale.yml", ".github/workflows/mlc_config.json...
[]
true
typescript-cheatsheets/react
821
issue_to_patch
modernize setup
62abf7b9948e80fdac249177942b98593c3b3e96
71f061918135539354183f231565153d8e3aa963
diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index c2f9eeedb..000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,1 +0,0 @@ -yarn pretty-quick --staged diff --git a/README.md b/README.md index 7064917db..c16a20cd3 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Cheatsheet for...
[ ".husky/pre-commit", "README.md", "docs/basic/setup.md", "package.json", "website/docusaurus.config.ts", "website/package.json", "website/src/css/custom.css", "website/src/pages/help.js", "website/src/pages/index.js", "website/src/pages/index.tsx", "website/src/pages/users.js", "website/tsconf...
[]
true
typescript-cheatsheets/react
815
issue_to_patch
React 19 modernization
Also added some concurrent content.
850e2a4da44ac61a8a2822d5dcb7442a79dd1d13
f459a45a027eceed2882ef1b123179f10262dd61
diff --git a/README.md b/README.md index 919c8a179..3ca1dba77 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,10 @@ React has documentation for [how to start a new React project](https://react.dev - [Gatsby](https://www.gatsbyjs.com/docs/how-to/custom-configuration/typescript/): `npm init gatsby --ts` - [Expo](...
[ "README.md", "docs/advanced/patterns_by_usecase.md", "docs/basic/getting-started/concurrent.md", "docs/basic/getting-started/context.md", "docs/basic/getting-started/default-props.md", "docs/basic/getting-started/hooks.md", "docs/basic/setup.md", "docs/hoc/index.md", "docs/react-types/CSSProperties....
[]
true
typescript-cheatsheets/react
816
issue_to_patch
Add CSSProperties and Ref reference pages
Also make some small improvements to the other reference pages.
168469a881f341abd84d3fb528611c6cebe96c1b
d0199c05ce96f3f4904615d59718d93236309425
diff --git a/docs/react-types/CSSProperties.md b/docs/react-types/CSSProperties.md new file mode 100644 index 000000000..94ad90209 --- /dev/null +++ b/docs/react-types/CSSProperties.md @@ -0,0 +1,150 @@ +--- +title: CSSProperties +--- + +`CSSProperties` is the type for inline styles passed via the `style` prop. It exte...
[ "docs/react-types/CSSProperties.md", "docs/react-types/ComponentProps.md", "docs/react-types/ReactNode.md", "docs/react-types/Ref.md", "docs/react-types/index.md" ]
[]
true
typescript-cheatsheets/react
819
issue_to_patch
dump outdated content
170096ef2a53e2c401f2f791aa88c1b480f01fe1
58159d27f3cf2d80ecb57ad62fe3a25c79089af6
diff --git a/README.md b/README.md index b7c63aa02..919c8a179 100644 --- a/README.md +++ b/README.md @@ -106,37 +106,7 @@ Cheatsheet for using React with TypeScript. - [Option 1: Using react-error-boundary](#option-1-using-react-error-boundary) - [Option 2: Writing your custom error boundary component](#o...
[ "README.md", "docs/advanced/misc-concerns.md", "docs/advanced/patterns_by_usecase.md", "docs/advanced/patterns_by_version.md", "docs/basic/editor-integration.md", "docs/basic/examples.md", "docs/basic/getting-started/basic-type-examples.md", "docs/basic/getting-started/function-components.md", "docs...
[]
true
typescript-cheatsheets/react
818
issue_to_patch
Remove migration cheat sheet
38ec3b0a093a0b80c04d9ed6ed21db12de632d00
88a253a2861651d264e7f8436cc4400735229c6c
diff --git a/.github/ISSUE_TEMPLATE/migrating-cheatsheet.md b/.github/ISSUE_TEMPLATE/migrating-cheatsheet.md deleted file mode 100644 index 2a3dde110..000000000 --- a/.github/ISSUE_TEMPLATE/migrating-cheatsheet.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Migrating Cheatsheet -about: Report Issue/Suggest an idea for M...
[ ".github/ISSUE_TEMPLATE/migrating-cheatsheet.md", "README.md", "docs/advanced/index.md", "docs/advanced/misc-concerns.md", "docs/advanced/patterns_by_version.md", "docs/advanced/utility-types.md", "docs/basic/recommended/codebases.md", "docs/basic/recommended/resources.md", "docs/basic/troubleshooti...
[]
true
typescript-cheatsheets/react
817
issue_to_patch
Update dependencies
168469a881f341abd84d3fb528611c6cebe96c1b
832a681f4035af6617395bd3feaa9e864739cef3
diff --git a/.husky/pre-commit b/.husky/pre-commit index f3a679604..c2f9eeedb 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - yarn pretty-quick --staged diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..757fd64ca --- /dev/nu...
[ ".husky/pre-commit", ".prettierrc", "README.md", "docs/advanced/misc-concerns.md", "docs/advanced/patterns_by_usecase.md", "docs/advanced/patterns_by_version.md", "docs/basic/getting-started/class-components.md", "docs/basic/getting-started/concurrent.md", "docs/basic/getting-started/forms-and-event...
[]
true
typescript-cheatsheets/react
800
issue_to_patch
Enhance `useReducer` example and add section on explicit typing
Hello, I noticed that in the `useReducer` section, the introductory text strongly recommends adding a return type for the reducer, but the code example does not include one. Additionally, I added a section on explicit typing for `useReducer` for cases where TypeScript can't infer the correct types from the reducer, as...
c299ceb2d0d26cdff06b2350b2ed6fd8d2449cc0
3f8ea7a66e7d82f9c4a4165f21e261f0feb2b6c7
diff --git a/README.md b/README.md index 6bcfdcc4c..0a828cca0 100644 --- a/README.md +++ b/README.md @@ -384,7 +384,10 @@ type ACTIONTYPE = | { type: "increment"; payload: number } | { type: "decrement"; payload: string }; -function reducer(state: typeof initialState, action: ACTIONTYPE) { +function reducer( + ...
[ "README.md", "docs/basic/getting-started/hooks.md" ]
[]
true
typescript-cheatsheets/react
814
issue_to_patch
docs: clarify class properties and fix minor typos (fixes #808)
Hello! I've updated the documentation to address several points of confusion and errors: **Clarified Class Properties: Updated the Class Components section to provide a clearer explanation of property declaration without confusing it with React state (Addressing #808).** **1. Fixed CSS Typo: **Corrected papyawhip...
c299ceb2d0d26cdff06b2350b2ed6fd8d2449cc0
c609f11787f9525094c411c6506fcafe3baa63bb
diff --git a/README.md b/README.md index 6bcfdcc4c..f59c04feb 100644 --- a/README.md +++ b/README.md @@ -759,7 +759,7 @@ class App extends React.Component<{ message: string }, { count: number }> { [View in the TypeScript Playground](https://www.typescriptlang.org/play/?jsx=2#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wF...
[ "README.md", "docs/basic/getting-started/class-components.md" ]
[]
true
typescript-cheatsheets/react
813
issue_to_patch
docs: fix papayawhip typo and context section grammar
Hello! I've noticed a couple of minor errors while going through the documentation: **1. Typo in Portals:** Corrected papyawhip to papayawhip in docs/basic/getting-started/portals.md. **2. Grammar in Context:** Fixed "will has" to "will have" in docs/basic/getting-started/context.md. I have made these edits di...
c299ceb2d0d26cdff06b2350b2ed6fd8d2449cc0
f4638c876329fec8516738117983b0bba29efe48
diff --git a/README.md b/README.md index 6bcfdcc4c..6524f8a30 100644 --- a/README.md +++ b/README.md @@ -1553,7 +1553,7 @@ const useCurrentUser = () => { }; ``` -Using a runtime type check in this will has the benefit of printing a clear error message in the console when a provider is not wrapping the components pr...
[ "README.md", "docs/basic/getting-started/context.md", "docs/basic/getting-started/portals.md" ]
[]
true
typescript-cheatsheets/react
799
issue_to_patch
Add deprecation info for FormEvent and FormEventHandler
Hello, This small change addresses the recent deprecation of `FormEvent` and `FormEventHandler` introduced in [DefinitelyTyped/DefinitelyTyped#74383](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/74383). The deprecation appears to trigger warnings, as reported in this thread: https://github.com/remix-run/rea...
911f92807caafbf71956973219991aa8e9be1af0
0107addd6fdd104b0c71a930838a60d89670b27e
diff --git a/README.md b/README.md index eaf6aa15c..6bcfdcc4c 100644 --- a/README.md +++ b/README.md @@ -1379,6 +1379,8 @@ The first method uses an inferred method signature `(e: React.FormEvent<HTMLInpu </details> +> Starting with React v19.2.10 `FormEvent` and `FormEventHandler` are deprecated and should be repl...
[ "README.md", "docs/basic/getting-started/forms-and-events.md" ]
[]
true
typescript-cheatsheets/react
793
issue_to_patch
docs: fix incorrect union type explanation- Corrected A | B explanati…
## Description Fixes incorrect explanation of TypeScript union types in the documentation. ## The Issue The documentation incorrectly stated that `A | B` means "A or B or both at once". This is incorrect - union types represent exactly one type or the other, not both simultaneously. ## Changes Made - Correct...
25d30ac3361c231ef7fe7f7acfe63c29e021460f
ceeabf98088e8069493befff6513a9e317641959
diff --git a/README.md b/README.md index d97c6fb8e..eaf6aa15c 100644 --- a/README.md +++ b/README.md @@ -2038,7 +2038,7 @@ class App extends React.Component< [View in the TypeScript Playground](https://www.typescriptlang.org/play/?jsx=2#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wFgAoCtAGxQGc64BBMMOJADxiQDsATRsnQwAdAGFc...
[ "README.md", "docs/basic/troubleshooting/types.md" ]
[]
true
typescript-cheatsheets/react
789
issue_to_patch
React 19 modernization: ref as prop and improved structure
## React 19 modernization: ref as prop and improved structure Related to #777 ### **Key Changes** - **Prioritize React 19+ patterns**: `ref` as prop approach now leads the forwardRef documentation - **Clear version guidance**: Separate sections for React 19+ vs legacy (≤18) approaches - **Improved structure...
0f2f10f8b42173733511824e43b5178667b7ce64
035374e2cd50cddf17dde64abeb4aadd0e5c0297
diff --git a/README.md b/README.md index 25fd30590..d97c6fb8e 100644 --- a/README.md +++ b/README.md @@ -1599,22 +1599,62 @@ When you don't know what to choose, prefer runtime checking and throwing over ty #### forwardRef/createRef -Check the [Hooks section](https://github.com/typescript-cheatsheets/react/blob/mai...
[ "README.md", "docs/basic/getting-started/forward-create-ref.md", "docs/react-types/ComponentProps.md" ]
[]
true
typescript-cheatsheets/react
786
issue_to_patch
added react 19 ref a prop guide
Thanks for contributing! - **If you are making a significant PR**, please make sure there is an open issue first - **If you're just fixing typos or adding small notes**, a brief explanation of why you'd like to add it would be nice :) **If you are contributing to README.md, DON'T**. README.md is auto-generated. ...
16ea7aaebcdc3b35373e7a4ebb9c9742e97ade90
74752c05713de341d84e086f50a1669211dc6db3
diff --git a/README.md b/README.md index e1f23eab0..25fd30590 100644 --- a/README.md +++ b/README.md @@ -1661,6 +1661,21 @@ export const FancyButton = forwardRef( If you are grabbing the props of a component that forwards refs, use [`ComponentPropsWithRef`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a05...
[ "README.md", "docs/basic/getting-started/forward-create-ref.md" ]
[]
true
typescript-cheatsheets/react
781
issue_to_patch
`InputEvent` in forms-and-events.md
- React now supports `InputEvent`: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/72802 - `InputEvent` is now widely supported https://developer.mozilla.org/en-US/docs/Web/API/InputEvent#browser_compatibility
c8c50f6ea8b6681b8abbcf47973b58bca58a7296
a1bd9fe2319b03829a236a15944af44b738fa1a5
diff --git a/README.md b/README.md index f5219bf8c..e1f23eab0 100644 --- a/README.md +++ b/README.md @@ -1432,6 +1432,7 @@ Of course, if you're making any sort of significant form, [you should use Formik | FormEvent | Event that occurs whenever a form or form element gets/loses focus, a form element value is ch...
[ "README.md", "docs/basic/getting-started/forms-and-events.md" ]
[]
true
typescript-cheatsheets/react
772
issue_to_patch
[Migrating] Faulty link to dts-gen **What cheatsheet is this about? (if applicable)** Migrating cheatsheet **What's your issue or idea?** In the first bullet list in the "General Conversion approaches" section (https://react-typescript-cheatsheet.netlify.app/docs/migration/), sub-bullet 1 under "Level 2: Stri...
Fix link in migrating cheatsheet
Resolves https://github.com/typescript-cheatsheets/react/issues/767.
05c2c6b290d2c3319439458128dd604d09d3a292
5a55f23e9517e4e5c596f1ec6628f91b3226973c
diff --git a/docs/migration/index.md b/docs/migration/index.md index b7b60afdf..063419633 100644 --- a/docs/migration/index.md +++ b/docs/migration/index.md @@ -23,7 +23,7 @@ Read [TypeScript's official Guide for migrating from JS](https://www.typescriptl - "[Just rename all .js files to .ts](https://twitter.com/jam...
[ "docs/migration/index.md" ]
[]
true
typescript-cheatsheets/react
760
issue_to_patch
Update official-typings-bugs.md
fix typo Thanks for contributing! - **If you are making a significant PR**, please make sure there is an open issue first - **If you're just fixing typos or adding small notes**, a brief explanation of why you'd like to add it would be nice :) **If you are contributing to README.md, DON'T**. README.md is auto...
6b69a322f4854862a0fa1f4562b0d5c829225817
9944cd39a910d3fc039dc929d584049377530052
diff --git a/README.md b/README.md index e6a82477f..f5219bf8c 100644 --- a/README.md +++ b/README.md @@ -2652,7 +2652,7 @@ const f = (e: PlotlyHTMLElement) => { }; ``` -You dont always have to implement the module, you can simply import the module as `any` for a quick start: +You don't always have to implement the ...
[ "README.md", "docs/basic/troubleshooting/official-typings-bugs.md" ]
[]
true
typescript-cheatsheets/react
757
issue_to_patch
Fix readme
62579ad3a794bc5ac9b566d7ddcde98c8c34de4f
b8a8d839f791d5c97d4a8ce237c21f4719a90cc9
diff --git a/README.md b/README.md index ba77c4174..e6a82477f 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,8 @@ Cheatsheet for using React with TypeScript. - [My question isn't answered here!](#my-question-isnt-answered-here) - [Contributors](#contributors) +</details> + <!--START-SECTION:setup--> ...
[ "README.md" ]
[]
true
typescript-cheatsheets/react
756
issue_to_patch
Change title to singular
845914077da91ef943b6362bdf04a3dabb6b00f8
0dbd35f05189636eac66bcc51ede9055d7a1f512
diff --git a/README.md b/README.md index 7fe48dec2..ba77c4174 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# React+TypeScript Cheatsheets +# React TypeScript Cheatsheet -Cheatsheets for experienced React developers getting started with TypeScript +Cheatsheet for using React with TypeScript. --- @@ -15...
[ "README.md" ]
[]
true
typescript-cheatsheets/react
754
issue_to_patch
HOC: add Use Cases
This PR adds possible use cases of implementing an HOC to give a gist of where HOCs are typically used and readers can then take inspiration from it to build their own custom HOCs.
15c1f00f515bc84f8596ce35565ef4de3fdae067
84617557fb97f47c37e9c189d9c7ab3bc4371486
diff --git a/docs/hoc/index.md b/docs/hoc/index.md index d2992ea3e..8ec5e9e5f 100644 --- a/docs/hoc/index.md +++ b/docs/hoc/index.md @@ -11,6 +11,13 @@ title: HOC Cheatsheet - Render props may be considered in the future - The goal is to write HOCs that offer type safety while not getting in the way. +There are a l...
[ "docs/hoc/index.md" ]
[]
true
typescript-cheatsheets/react
753
issue_to_patch
docs: fix a typo
- Add Vite to the setup (as the Vite react starter template is also very popular) - Fix a bracket typo on the HOC Cheatsheet part at the "All React + TypeScript Cheatsheets" section
99b7f9cc1c3963718359b6ef5f35b1cc126649e1
3ce68049968589845009083cbc460bc9ec03f4a7
diff --git a/README.md b/README.md index f7a12534e..7fe48dec2 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Cheatsheets for experienced React developers getting started with TypeScript - [The Migrating Cheatsheet](https://react-typescript-cheatsheet.netlify.app/docs/migration) helps collate advice for incre...
[ "README.md" ]
[]
true
typescript-cheatsheets/react
745
issue_to_patch
Fix: Fixed typos
Fixed some typos I found on some pages.
c5133da5eb8e25f31017e5f1ff8e2ea2bf2c385e
7ff8542097a47205d382557d9219eeb58eb6e88f
diff --git a/docs/advanced/patterns_by_usecase.md b/docs/advanced/patterns_by_usecase.md index ede4726ae..8d64b984d 100644 --- a/docs/advanced/patterns_by_usecase.md +++ b/docs/advanced/patterns_by_usecase.md @@ -571,7 +571,7 @@ function handle(event: UserEvent) { <details> <summary> - Take care: TypeScript does...
[ "docs/advanced/patterns_by_usecase.md", "docs/advanced/utility-types.md", "docs/hoc/index.md" ]
[]
true
typescript-cheatsheets/react
744
issue_to_patch
chore: Update `actions/setup-node` to `v4`
- Bump node version to 20.x (https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default) - Read node version directly from `.nvmrc` file using the `node-version-file` command (https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#node-version-fi...
d6f397f8f409d9e3da4f4b715cb4b499c3807170
81fb7b9996baf1815cb30747acafa98f3ebb838b
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1fdb2bd97..392465cf8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,14 +12,10 @@ jobs: - name: Checkout commit uses: actions/checkout@v4 - - name: Read .nvmrc - run: echo "NVMRC=$(ca...
[ ".github/workflows/main.yml", ".nvmrc" ]
[ { "comment": "Let's use double quotes as the rest of the file\n\n```suggestion\n node-version-file: \".nvmrc\"\n```\n", "path": ".github/workflows/main.yml", "hunk": "@@ -12,14 +12,10 @@ jobs:\n - name: Checkout commit\n uses: actions/checkout@v4\n \n- - name: Read .nvmrc\n- ...
true
typescript-cheatsheets/react
744
comment_to_fix
chore: Update `actions/setup-node` to `v4`
Let's use double quotes as the rest of the file ```suggestion node-version-file: ".nvmrc" ```
d6f397f8f409d9e3da4f4b715cb4b499c3807170
81fb7b9996baf1815cb30747acafa98f3ebb838b
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1fdb2bd97..392465cf8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,14 +12,10 @@ jobs: - name: Checkout commit uses: actions/checkout@v4 - - name: Read .nvmrc - run: echo "NVMRC=$(ca...
[ ".github/workflows/main.yml" ]
[ { "comment": "Let's use double quotes as the rest of the file\n\n```suggestion\n node-version-file: \".nvmrc\"\n```\n", "path": ".github/workflows/main.yml", "hunk": "@@ -12,14 +12,10 @@ jobs:\n - name: Checkout commit\n uses: actions/checkout@v4\n \n- - name: Read .nvmrc\n- ...
true
typescript-cheatsheets/react
743
issue_to_patch
Fix: add missing alt attributes
The Discord and X links on the footer were missing an alt attribute. Adding them will improve the website's accessibility.
56859a7f54fd898416d94bb109e5093733cf63aa
824badf926151da26b053ad5af0d2add9d8bd9eb
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 97bf0ee29..699ce4d59 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -156,13 +156,13 @@ module.exports = { { // label: "Discord", html: `<a class="footer__link-item" ...
[ "website/docusaurus.config.js" ]
[]
true
typescript-cheatsheets/react
740
issue_to_patch
Fix: Update GitHub Star Image URL to Resolve Broken Link (BROKEN IMAGE #737)
Here's the PR description in bullet points with a comparison of the footer states: - Fixed the broken GitHub star image link in the docusaurus.config.js file. - Updated the faulty link and replaced it with the correct URL for the GitHub star badge. - Earlier, the footer appeared like this: ![Screenshot 2024...
828ac1f81d567a1944b4b3be8f551b198ca6cf57
091465f607290b97f8c2990a79b4e7ed486a5c02
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 5d9440fa5..97bf0ee29 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -150,7 +150,7 @@ module.exports = { }, { html: `<a class="footer__link-item" href="https://github.c...
[ "website/docusaurus.config.js" ]
[]
true
typescript-cheatsheets/react
730
issue_to_patch
Light Mode First of all thank you to the community for making such a wonderful guide. I've noticed an error when using the guide in light mode the code stays in dark mode. For example at https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/basic_type_example/ on my Mac running Chrome it looks ...
Make code blocks light on light color mode
Resolves https://github.com/typescript-cheatsheets/react/issues/728
1bf7925d24c05ef210ba32abc12965d8aee118e9
6c41061d17bf4fcc3701b25fddb7e3907cc81926
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index f6521fda6..5d9440fa5 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -1,3 +1,5 @@ +const { themes } = require("prism-react-renderer"); + // List of projects/orgs using your project for the users page. const ...
[ "website/docusaurus.config.js", "website/package.json", "website/yarn.lock" ]
[]
true
typescript-cheatsheets/react
717
issue_to_patch
Change "Nothing or All" to "All or Nothing" for poetic reasons.
Hi, I thougt it would be more poetic to change "Nothing or All" to "All or Nothing". :)
bc19e0323d7fce91f116384f66754a99c53a3cdf
5f68eff3f83f5a4b0f117dd34f285af30da26862
diff --git a/docs/advanced/patterns_by_usecase.md b/docs/advanced/patterns_by_usecase.md index 556136e20..0ac97ae77 100644 --- a/docs/advanced/patterns_by_usecase.md +++ b/docs/advanced/patterns_by_usecase.md @@ -714,19 +714,19 @@ const Component = () => ( [View in the TypeScript Playground](https://www.typescriptla...
[ "docs/advanced/patterns_by_usecase.md" ]
[]
true
typescript-cheatsheets/react
721
issue_to_patch
Add missing primitive
Add missing primitive.
3129901a147edb125ea84fd35bf30a811e79e551
1295104536039582cc4f7e198a48e6536b17ab52
diff --git a/README.md b/README.md index aed8ccc59..7f00dfb40 100644 --- a/README.md +++ b/README.md @@ -1113,7 +1113,7 @@ type AppProps = { ##### `object` as the non-primitive type -`object` is a common source of misunderstanding in TypeScript. It does not mean "any object" but rather "any non-primitive type", wh...
[ "README.md", "docs/basic/getting-started/basic-type-examples.md" ]
[]
true
typescript-cheatsheets/react
722
issue_to_patch
Add missing word; Consistent capitalization
Add missing word; Consistent capitalization.
3129901a147edb125ea84fd35bf30a811e79e551
fa22223e21c78420551495d7ca18e762ea4bcf9c
diff --git a/README.md b/README.md index aed8ccc59..c3f4fe0dc 100644 --- a/README.md +++ b/README.md @@ -189,10 +189,10 @@ type AppProps = { // Easiest way to declare a Function Component; return type is inferred. const App = ({ message }: AppProps) => <div>{message}</div>; -// you can choose annotate the return ty...
[ "README.md", "docs/basic/getting-started/function-components.md" ]
[]
true
typescript-cheatsheets/react
723
issue_to_patch
Fix typos
bc19e0323d7fce91f116384f66754a99c53a3cdf
3d3d59c134161c1e2bb4f4d447659ea7052b166b
diff --git a/docs/advanced/patterns_by_usecase.md b/docs/advanced/patterns_by_usecase.md index 556136e20..e61f0b83f 100644 --- a/docs/advanced/patterns_by_usecase.md +++ b/docs/advanced/patterns_by_usecase.md @@ -505,7 +505,7 @@ const Link = <T extends {}>( <details> <summary><b>Approach: Composition</b></summary> ...
[ "docs/advanced/patterns_by_usecase.md" ]
[]
true
typescript-cheatsheets/react
720
issue_to_patch
Fix typo
Fix typo.
bc19e0323d7fce91f116384f66754a99c53a3cdf
7926c4c9190b06a36bb688cfcb7479a0ff81bc84
diff --git a/docs/react-types/ComponentProps.md b/docs/react-types/ComponentProps.md index 50ed42a83..613840a9c 100644 --- a/docs/react-types/ComponentProps.md +++ b/docs/react-types/ComponentProps.md @@ -57,7 +57,7 @@ The type of a specific prop can also be inferred this way. Let's say you are usi type IconName = "wa...
[ "docs/react-types/ComponentProps.md" ]
[]
true
typescript-cheatsheets/react
716
issue_to_patch
Update official-typings-bugs.md [(utitity)->(utility)](1)
changed the spelling, it was bothering me
09217c90d60b0a8c513ce5ea0c1e18d8bd898cac
6887028ec64bceba855726cea27562d1bfada46b
diff --git a/README.md b/README.md index 034e3a45c..03f3e6db7 100644 --- a/README.md +++ b/README.md @@ -2657,7 +2657,7 @@ Because you don't have to explicitly import this, this is known as an [ambient m You can also do ambient variable and ambient type declarations: ```ts -// ambient utiltity type +// ambient util...
[ "README.md", "docs/basic/troubleshooting/official-typings-bugs.md" ]
[]
true
typescript-cheatsheets/react
714
issue_to_patch
Add React.FC example with predefined type
To show a fair comparison between the different approaches on how to type a react component, the `React.FC<AppProps>` approach should also be listed. It may be technically similar but has the best readability from my experience.
09217c90d60b0a8c513ce5ea0c1e18d8bd898cac
ea71c29be69f547346aad7936c0a13ac4b8decd0
diff --git a/README.md b/README.md index 034e3a45c..f04c58deb 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,8 @@ const App = ({ message }: { message: string }) => <div>{message}</div>; const App: React.FunctionComponent<{ message: string }> = ({ message }) => ( <div>{message}</div> ); +// or +const App: Re...
[ "README.md", "docs/basic/getting-started/function-components.md" ]
[]
true
typescript-cheatsheets/react
710
issue_to_patch
Add new option for generic forwardRefs
Per title.
4d6be66572c9544cf55d4ce86cddf63569db269b
d6554813e316f44c46a152b1f55efe800a9ef53c
diff --git a/README.md b/README.md index d75255de6..034e3a45c 100644 --- a/README.md +++ b/README.md @@ -1730,6 +1730,22 @@ function ClickableListInner<T>( export const ClickableList = forwardRef(ClickableListInner); ``` +##### Option 3 - Call signature + +```ts +// Add to `index.d.ts` +interface ForwardRefWithGene...
[ "README.md", "docs/basic/getting-started/forward-create-ref.md" ]
[]
true
typescript-cheatsheets/react
705
issue_to_patch
Fix "Redeclare" typo
Noticed this minor typo. Wasn't sure whether I should _only_ update `docs/basic/getting-started/forward-create-ref.md` or generate the new `README.md` as well. It's included for now, let me know if this is okay!
3bbc27fa5b2e94a60362004318a24bde95291c84
f09a657107a0410cd75cdef7900732e09c1a6a72
diff --git a/README.md b/README.md index eb3504270..d75255de6 100644 --- a/README.md +++ b/README.md @@ -1696,7 +1696,7 @@ export function ClickableList<T>(props: ClickableListProps<T>) { ##### Option 2 - Redeclare forwardRef ```ts -// Redecalare forwardRef +// Redeclare forwardRef declare module "react" { func...
[ "README.md", "docs/basic/getting-started/forward-create-ref.md" ]
[]
true
typescript-cheatsheets/react
704
issue_to_patch
docs: add sasirura as a contributor for doc
Adds @sasirura as a contributor for doc. This was requested by filiptammergard [in this comment](https://github.com/typescript-cheatsheets/react/issues/702#issuecomment-1932224886) [skip ci]
67cc43a986db603b87fcfd4cc56132cbd0f82966
f398469a3121fe556f64ff83f7090b6ccd7c17f7
diff --git a/.all-contributorsrc b/.all-contributorsrc index 3c906ca23..03edd8766 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -232,6 +232,15 @@ "contributions": [ "doc" ] + }, + { + "login": "sasirura", + "name": "Sasiru Ravihansa", + "avatar_url": "https://...
[ ".all-contributorsrc", "CONTRIBUTORS.md" ]
[]
true
typescript-cheatsheets/react
703
issue_to_patch
[Basic] Linting page links are not working **What cheatsheet is this about? (if applicable)** Basic cheatsheet **What's your issue or idea?** Linting page some reference links are not working
removed Matterhorn blog link since it is not working
I removed the Matterhorn blog post in the linting page since it's not working
95834279a28eedcd72fd6e3d9404337f46e5d629
f8d01453ac6e397c68844da4b0f39f6678b03d72
diff --git a/README.md b/README.md index 752d4d439..eb3504270 100644 --- a/README.md +++ b/README.md @@ -2817,8 +2817,6 @@ More `.eslintrc.json` options to consider with more options you may want for **a } ``` -You can read a [fuller TypeScript + ESLint setup guide here](https://blog.matterhorn.dev/posts/learn-type...
[ "README.md", "docs/basic/linting.md" ]
[]
true
typescript-cheatsheets/react
700
issue_to_patch
docs: add filiptammergard as a contributor for doc, and code
Adds @filiptammergard as a contributor for doc, code. This was requested by eps1lon [in this comment](https://github.com/typescript-cheatsheets/react/issues/697#issuecomment-1924237772) [skip ci]
0b921027c0ff8b984bd6e5ad6a83d028fcc7512a
daeeb802b0a6987c9c0681aec2bcd60a05d5b876
diff --git a/.all-contributorsrc b/.all-contributorsrc index c10a873e6..3c906ca23 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -214,6 +214,16 @@ "doc" ] }, + { + "login": "filiptammergard", + "name": "Filip Tammergård", + "avatar_url": "https://avatars.githubuserc...
[ ".all-contributorsrc", "CONTRIBUTORS.md" ]
[]
true
typescript-cheatsheets/react
698
issue_to_patch
docs: add jsjoeio as a contributor for doc
Adds @jsjoeio as a contributor for doc. This was requested by eps1lon [in this comment](https://github.com/typescript-cheatsheets/react/issues/697#issuecomment-1924235206) [skip ci]
9e7fdb577d1aa18b3067031857e224bb296afac5
bba0d407c88dbec9abc22a24d3c1f0b964bc5021
diff --git a/.all-contributorsrc b/.all-contributorsrc index 6f8010f6e..c10a873e6 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -213,6 +213,15 @@ "contributions": [ "doc" ] + }, + { + "login": "jsjoeio", + "name": "Joe Previte", + "avatar_url": "https://avatar...
[ ".all-contributorsrc", "CONTRIBUTORS.md" ]
[]
true
typescript-cheatsheets/react
688
issue_to_patch
updated CONTRIBUTING.md, made it better, precise, and emojified
Thanks for contributing! First, if you are reading this, you are amazing! ⭐ I'm Armaan and I'm actively taking part in Hacktoberfest and HackSquad, I came across this repo after listening about it from my friends and various other folks, unlike other amazing repos, I found this repo to have a simple, clean and am...
41b4ac30ac8c2dad8680516f28169a045874bbfa
bd9c9bb33f034a7b5babc52204d1eeb169a5e541
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d43425c2..757576413 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,33 +1,36 @@ -# So you want to contribute! +# Let's Contribute Together! 🚀 -Thanks for helping out the community! We are actively looking for contributors and maintainers so you are more ...
[ "CONTRIBUTING.md" ]
[]
true
typescript-cheatsheets/react
693
issue_to_patch
Fix typo in excluding-props.md
53d9a7a17e70f8d4e2bee27e9349a57e9a8c5e2a
5730d791b9f1b5f4113be322b2217c8831d8bf28
diff --git a/docs/hoc/excluding-props.md b/docs/hoc/excluding-props.md index d40e0db50..42a89a3f1 100644 --- a/docs/hoc/excluding-props.md +++ b/docs/hoc/excluding-props.md @@ -95,7 +95,7 @@ function withInjectedProps<U extends Record<string, unknown>>( ) { return function <T extends U>(Component: React.ComponentTy...
[ "docs/hoc/excluding-props.md" ]
[]
true
typescript-cheatsheets/react
690
issue_to_patch
Gen readme
Thanks for contributing! - **If you are making a significant PR**, please make sure there is an open issue first - **If you're just fixing typos or adding small notes**, a brief explanation of why you'd like to add it would be nice :) **If you are contributing to README.md, DON'T**. README.md is auto-generated. Pleas...
9104d89e422a351e17f0290f5cd323a2b02c3672
cac7514f399455222c887ff0dcc0c31e4fc02ada
diff --git a/README.md b/README.md index d1fb6cca6..752d4d439 100644 --- a/README.md +++ b/README.md @@ -2876,7 +2876,7 @@ If you're looking for information on Prettier, check out the [Prettier](https:// - [React & TypeScript - Course for Beginners](https://www.youtube.com/watch?v=FJDVKeh7RJI), by FreeCodeCamp 2022 -...
[ "README.md" ]
[]
true
typescript-cheatsheets/react
685
issue_to_patch
added few more talks
This PR adds few good talks to strengthen your knowledge in Typescript and React
e51c20c496be994b70301a1c76f18c1ce241ff5a
d9bbc9d3f5b0be514de9a1ee2be4ea8b72453a96
diff --git a/README.md b/README.md index 5d4403dcc..d1fb6cca6 100644 --- a/README.md +++ b/README.md @@ -2874,6 +2874,10 @@ If you're looking for information on Prettier, check out the [Prettier](https:// - [Advanced TypeScript with React](https://youtu.be/zQfD4ZxxyKA?si=FmrgOq667svX6C9O), by Nikhil Verma 2019 - [Sen...
[ "README.md", "docs/basic/recommended/talks.md" ]
[ { "comment": "```suggestion\n- [Using Hooks and codegen](https://www.youtube.com/watch?v=cdsnzfJUqm0), by Tejas Kumar 2019\n```\n", "path": "README.md", "hunk": "@@ -2874,6 +2874,10 @@ If you're looking for information on Prettier, check out the [Prettier](https://\n - [Advanced TypeScript with React](h...
true
typescript-cheatsheets/react
685
comment_to_fix
added few more talks
```suggestion - [Using Hooks and codegen](https://www.youtube.com/watch?v=cdsnzfJUqm0), by Tejas Kumar 2019 ```
e51c20c496be994b70301a1c76f18c1ce241ff5a
d9bbc9d3f5b0be514de9a1ee2be4ea8b72453a96
diff --git a/README.md b/README.md index 5d4403dcc..d1fb6cca6 100644 --- a/README.md +++ b/README.md @@ -2874,6 +2874,10 @@ If you're looking for information on Prettier, check out the [Prettier](https:// - [Advanced TypeScript with React](https://youtu.be/zQfD4ZxxyKA?si=FmrgOq667svX6C9O), by Nikhil Verma 2019 - [Sen...
[ "README.md" ]
[ { "comment": "```suggestion\n- [Using Hooks and codegen](https://www.youtube.com/watch?v=cdsnzfJUqm0), by Tejas Kumar 2019\n```\n", "path": "README.md", "hunk": "@@ -2874,6 +2874,10 @@ If you're looking for information on Prettier, check out the [Prettier](https://\n - [Advanced TypeScript with React](h...
true
typescript-cheatsheets/react
679
issue_to_patch
[Basic] Add resources to basic/recommended/talks.md **What cheatsheet is this about? (if applicable)** Basic cheatsheet **What's your issue or idea?** Add new recommended talks in [talks.md](https://github.com/typescript-cheatsheets/react/blob/main/docs/basic/recommended/talks.md)
Add resources to basic/recommended/talks.md
Thanks for contributing! This solves issue #662 Add new recommended talks in [talks.md](https://github.com/typescript-cheatsheets/react/blob/main/docs/basic/recommended/talks.md) Also this is hacktoberfest if you could add the label .Thanks in advance - **If you are making a significant PR**, please make sur...
d7689519188d0e48486832d00608d3eaa04ef130
b89d2aef5f1d4a9da8a327fa11a29c17a7991ab2
diff --git a/README.md b/README.md index fa1b9f62b..b3b93c78d 100644 --- a/README.md +++ b/README.md @@ -2873,6 +2873,7 @@ If you're looking for information on Prettier, check out the [Prettier](https:// - [Create a More Readable React Codebase Using TypeScript](https://youtu.be/nkJbGgieALI?si=IFZZIMEiXz7AsiBv), by Em...
[ "README.md", "docs/basic/recommended/talks.md" ]
[ { "comment": "```suggestion\r\n- [React & TypeScript - Course for Beginners](https://www.youtube.com/watch?v=FJDVKeh7RJI), by FreeCodeCamp 2022\r\n```", "path": "docs/basic/recommended/talks.md", "hunk": "@@ -9,4 +9,5 @@ sidebar_label: Talks\n - [Create a More Readable React Codebase Using TypeScript](h...
true
typescript-cheatsheets/react
679
comment_to_fix
Add resources to basic/recommended/talks.md
```suggestion - [React & TypeScript - Course for Beginners](https://www.youtube.com/watch?v=FJDVKeh7RJI), by FreeCodeCamp 2022 ```
d7689519188d0e48486832d00608d3eaa04ef130
b89d2aef5f1d4a9da8a327fa11a29c17a7991ab2
diff --git a/README.md b/README.md index fa1b9f62b..b3b93c78d 100644 --- a/README.md +++ b/README.md @@ -2873,6 +2873,7 @@ If you're looking for information on Prettier, check out the [Prettier](https:// - [Create a More Readable React Codebase Using TypeScript](https://youtu.be/nkJbGgieALI?si=IFZZIMEiXz7AsiBv), by Em...
[ "README.md" ]
[ { "comment": "```suggestion\n- [React & TypeScript - Course for Beginners](https://www.youtube.com/watch?v=FJDVKeh7RJI), by FreeCodeCamp 2022\n```\n", "path": "README.md", "hunk": "@@ -2873,6 +2873,7 @@ If you're looking for information on Prettier, check out the [Prettier](https://\n - [Create a More R...
true
typescript-cheatsheets/react
680
issue_to_patch
Fix: typo in context.md file
Thanks for contributing! - **If you are making a significant PR**, please make sure there is an open issue first - **If you're just fixing typos or adding small notes**, a brief explanation of why you'd like to add it would be nice :) **If you are contributing to README.md, DON'T**. README.md is auto-generated. ...
d7689519188d0e48486832d00608d3eaa04ef130
a6cf26437aa7dcd1c5399682b639612ba303dfd2
diff --git a/README.md b/README.md index fa1b9f62b..7d9890240 100644 --- a/README.md +++ b/README.md @@ -1532,7 +1532,7 @@ const MyComponent = () => { }; ``` -However, it would be preferrable to not have to check for `null`, since we know that the context won't be `null`. One way to do that is to provide a custom h...
[ "README.md", "docs/basic/getting-started/context.md" ]
[]
true
typescript-cheatsheets/react
676
issue_to_patch
Another resource added to talks.md
Updated [talks.md](https://github.com/typescript-cheatsheets/react/blob/main/docs/basic/recommended/talks.md) Related issue: #662 Added Resource **Senior Typescript Features You don't Know About - clean-code** talk link for anyone to visit and learn
4c7778df7bc5990055034eeb11a6675f93764728
35cd022d52ae01da66f2def9ae21dfd3b487624d
diff --git a/README.md b/README.md index efb72bc2e..fa1b9f62b 100644 --- a/README.md +++ b/README.md @@ -2872,6 +2872,7 @@ If you're looking for information on Prettier, check out the [Prettier](https:// - [How to Build React Apps with TypeScript](https://youtu.be/LJzGGmu5APA?si=YNzy7T_8yj7TuXxS), by ClearEdge Tech Ta...
[ "README.md", "docs/basic/recommended/talks.md" ]
[]
true
typescript-cheatsheets/react
674
issue_to_patch
new resource added in talks.md\ Updated PR
Updated [talks.md](https://github.com/typescript-cheatsheets/react/blob/main/docs/basic/recommended/talks.md) Related issue: #662 Added Resource **Advanced TypeScript with React** talk link for anyone to visit and learn
a435c3617228ff61a7354fd00c10312b2498072b
1c8ec50ad6934ca2df802e4c10fe7221f927d9b6
diff --git a/README.md b/README.md index 131fc3ac2..efb72bc2e 100644 --- a/README.md +++ b/README.md @@ -2871,6 +2871,7 @@ If you're looking for information on Prettier, check out the [Prettier](https:// - [Ultimate React Component Patterns with TypeScript](https://www.youtube.com/watch?v=_PBQ3if6Fmg), by Martin Hoche...
[ "README.md", "docs/basic/recommended/talks.md" ]
[]
true
typescript-cheatsheets/react
649
issue_to_patch
[Bug] The logo text is overflowing in small devices it should be truncate like mobile navigation. **What's your issue or idea?** When the width is small the homepage logo text is overflowing it should be truncate. ## Screenshot ## ![reacttype](https://github.com/typescript-cheatsheets/react/assets/82786865...
Fix:navbar title styling for better text wrapping #646
- Related Issue: #646 - Type of PR: Styling Update Changes: - Updated the CSS for the navbar title to improve text wrapping on smaller screens. ![Screenshot 2023-10-01 at 12 49 14 AM](https://github.com/typescript-cheatsheets/react/assets/82696351/246ea679-6d25-41ca-8e14-73935788b2ea) ![Screenshot 2023-10-01...
2d6171791952a8a269ebfe4bb24bb1bdc2716c8e
f6c5a510f67fd099f950f42faa9f571d3deaea26
diff --git a/website/src/css/custom.css b/website/src/css/custom.css index 557851107..542084665 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -13,6 +13,11 @@ margin: 0 auto; } +.navbar__title { + white-space: normal; + word-break: break-word; +} + .footer__logo { max-width: 4re...
[ "website/src/css/custom.css" ]
[]
true
typicode/husky
1,604
issue_to_patch
ci: remove Node.js 18, add 24 to Node.js CI workflow
## Situation The "Node.js CI" workflow [.github/workflows/node.js.yml](https://github.com/typicode/husky/blob/main/.github/workflows/node.js.yml) is using Node.js 18 which has reached end-of-life, and is not testing against the current version Node.js 24. Referring to the [Node.js release schedule](https://github...
0692639896ea5b5dd5ffc607575f6f870b21cb0f
7ee0fd1538db5046a23361f7976f0b237161ba8a
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 174c96883..7884e10ab 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,10 @@ jobs: test: strategy: matrix: - node-version: [18, 20, 22] + node-version: + - 20 ...
[ ".github/workflows/node.js.yml" ]
[]
true
typicode/husky
1,104
issue_to_patch
Actually set 'husky_skip_init' as readonly in `./husky.sh`
Previously, the `husky.sh` script would export the empty 'readonly' variable, along with 'husky_skip_init' which has a value of 1. Now, the script sets 'husky_skip_init' to 1, and properly gives is the 'readonly' and 'exported' attributes.
082a55c8e3427f73aad9c9650f959b74facd74ec
2e4da5ce986a917bc73ff08d0f85d58b58fdb6a4
diff --git a/husky.sh b/husky.sh index 6809ccca2..7be3296a4 100644 --- a/husky.sh +++ b/husky.sh @@ -19,7 +19,8 @@ if [ -z "$husky_skip_init" ]; then . ~/.huskyrc fi - export readonly husky_skip_init=1 + readonly husky_skip_init=1 + export husky_skip_init sh -e "$0" "$@" exitCode="$?"
[ "husky.sh" ]
[]
true
typicode/husky
1,458
issue_to_patch
Get the path from dirname instead of using Bash variable operators
On Windows, under certain circumstances, the path separator is "\\". This change will ensure compatibility with both Linux and Windows path separators
da40de3edd1eab39ff28193f748a4efbb05d2d70
c65ec43dd635c368bf19c92e19228b680cb1c033
diff --git a/husky b/husky index 86bd0ba5f..378dfd749 100644 --- a/husky +++ b/husky @@ -1,5 +1,12 @@ #!/usr/bin/env sh [ "$HUSKY" = "2" ] && set -x +if command -v cygpath >/dev/null 2>&1; then + u0=$(cygpath -u "$0") + if [ "$0" != "$u0" ]; then + exec "$u0" "$@" + fi +fi + h="${0##*/}" s="${0%/*/*}/$h" di...
[ "husky", "index.mjs" ]
[]
true
typicode/husky
1,448
issue_to_patch
chore(deps): bump yargs-parser and sponsorkit in /docs
Removes [yargs-parser](https://github.com/yargs/yargs-parser). It's no longer used after updating ancestor dependency [sponsorkit](https://github.com/antfu/sponsorkit). These dependencies need to be updated together. Removes `yargs-parser` Updates `sponsorkit` from 0.9.1 to 0.9.3 <details> <summary>Release notes</sum...
96979e216d83265fe6363a21beac4d3c4a164846
1e4d7ff8d4c9c5ad5949254305da8788efe2a984
diff --git a/docs/package-lock.json b/docs/package-lock.json index d7279bd75..541d2ef34 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "devDependencies": { - "sponsorkit": "^0.9.1", + "sponsorkit": "^0.9.3", "vitepress": "^1.0.1...
[ "docs/package-lock.json", "docs/package.json" ]
[]
true
typicode/husky
1,541
issue_to_patch
docs(spanish): update index.md - 3efdbb1
update Spanish documentation to last English documentation commit `3efdbb13c4b46e4b244eb7aede8729d4272b71fd` ![image](https://github.com/user-attachments/assets/8f4bb67c-e220-4899-a72c-f00b44a54710)
3efdbb13c4b46e4b244eb7aede8729d4272b71fd
6e75a848c26ae1e16223c995854ff2abff700a80
diff --git a/docs/es/index.md b/docs/es/index.md index 9d373e386..aa24d6178 100644 --- a/docs/es/index.md +++ b/docs/es/index.md @@ -11,7 +11,7 @@ Comienza [aquí](/es/get-started.md). ## Características - Solo `2 kB` (📦 _gzipped_) sin dependencias -- Extremadamente rápido (se ejecuta en `~1ms`) +- Más rápido por s...
[ "docs/es/index.md" ]
[]
true
typicode/husky
1,538
issue_to_patch
Add husky label to warning for deprecated commands **Troubleshoot** - [x] Before creating an issue, please check: https://typicode.github.io/husky/troubleshoot.html **Context** There are some situations where npm commands are run but the commands themselves are shown. In these cases, it may not be clear that th...
fix: add husky label to deprecated warning
Add husky label to deprecated commands. Old: ``` install command is DEPRECATED ``` New: ``` husky - install command is DEPRECATED ``` Fixes: https://github.com/typicode/husky/issues/1537
a2d942a670b3d6a04578005a0fd2dc310e511849
116df609de2d4e5a20140834d878c6bb05772df7
diff --git a/bin.js b/bin.js index 73ee3eda..244311ba 100755 --- a/bin.js +++ b/bin.js @@ -19,7 +19,7 @@ if (a == 'init') { p.exit() } -d = c => console.error(`${c} command is DEPRECATED`) +d = c => console.error(`husky - ${c} command is DEPRECATED`) if (['add', 'set', 'uninstall'].includes(a)) { d(a); p.exit(1) ...
[ "bin.js" ]
[]
true
typicode/husky
1,519
issue_to_patch
Fix issue where example pre-commit file is generated incorrectly
Fix to `bin.js` which incorrectly creates a partial example `pre-commit` file when `npx husky init` is called on systems with npm_config_user_agent set.
3b3e7f1785de637c493242d329cf4f4e1a626f73
0b2131010fca4ced4653960f8b24acd19132a92d
diff --git a/bin.js b/bin.js index 40d28590c..73ee3eda0 100755 --- a/bin.js +++ b/bin.js @@ -15,7 +15,7 @@ if (a == 'init') { w(n, JSON.stringify(o, 0, /\t/.test(s) ? '\t' : 2) + '\n') p.stdout.write(i()) try { f.mkdirSync('.husky') } catch {} - w('.husky/pre-commit', p.env.npm_config_user_agent?.split('/')[0] ??...
[ "bin.js" ]
[]
true
typicode/husky
1,504
issue_to_patch
docs(spanish): improve spanish translation
I have made some improvements to the Spanish translation and corrected some spelling mistakes.
dcf3aedadccb27ec542cee57d3c506988676a4e5
d9c412beaefc68a2b3519e314834bd5bb89f161c
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 16c7e5901..c48012b6d 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -96,7 +96,7 @@ export default defineConfig({ ], }, }, - sp: { + es: { label: "Español", lang: "es-EC", ...
[ "docs/.vitepress/config.mts", "docs/es/get-started.md", "docs/es/how-to.md", "docs/es/index.md", "docs/es/troubleshoot.md" ]
[]
true
typicode/husky
1,500
issue_to_patch
dosc: repair support Spanish sponsors links
Links to sponsorkit were updated.
c3afd5f88c0293bca66c617f9e20ba4896ec5e77
8a7c81585385bc0c41608074a833bd8000016324
diff --git a/docs/es/index.md b/docs/es/index.md index 1552b8e6f..2a4cdf3d6 100644 --- a/docs/es/index.md +++ b/docs/es/index.md @@ -44,8 +44,8 @@ Apoya este proyecto convirtiéndote en patrocinador (sponsor) [here](https://git ### GitHub <p align="center"> - <a href="./sponsorkit/sponsors.svg"> - <img src='./sp...
[ "docs/es/index.md" ]
[]
true
typicode/husky
1,499
issue_to_patch
docs: support Spanish documentation
support Spanish documentation
c5f4f483f8e02b1daac8b05041714809afb10c31
3371adfb6da2d503ba105355bc54e0d5e5365e0f
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 936537ef5..16c7e5901 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,96 +1,134 @@ -import { defineConfig } from 'vitepress' +import { defineConfig } from "vitepress"; // https://vitepress.dev/reference/site-conf...
[ "docs/.vitepress/config.mts", "docs/es/get-started.md", "docs/es/how-to.md", "docs/es/index.md", "docs/es/migrate-from-v4.md", "docs/es/troubleshoot.md" ]
[]
true
typicode/husky
1,495
issue_to_patch
docs: support Russian documentation
- support Russian documentation
fc549e0e5c8723a6d796f6ad26ef6590769f5d82
54d32120601ab5e55edacb8e652e8038da702012
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 734ae5870..936537ef5 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -66,6 +66,31 @@ export default defineConfig({ } ] } + }, + ru: { + label: 'Русский', + lang: 'ru-RU', + ...
[ "docs/.vitepress/config.mts", "docs/ru/get-started.md", "docs/ru/how-to.md", "docs/ru/index.md", "docs/ru/migrate-from-v4.md", "docs/ru/troubleshoot.md" ]
[]
true
typicode/husky
1,497
issue_to_patch
pre-merge-commit hook not triggering I've set up a `pre-merge-commit` hook using Husky, but it doesn't seem to be triggering when I perform a merge. Here are the details: ## Steps to Reproduce: 1. Add a pre-merge-commit hook with the following command: ```sh echo "echo 'pre-merge-commit hook triggered'" > .h...
fixes #1494, support pre-merge-commit hook
support pre-merge-commit hook fixes: #1494
fc549e0e5c8723a6d796f6ad26ef6590769f5d82
7a440e87363c6849f01ae84a54a296bd7d381893
diff --git a/index.js b/index.js index 5f11b648f..bebf0d50d 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ import c from 'child_process' import f, { readdir, writeFileSync as w } from 'fs' import p from 'path' -let l = [ 'pre-commit', 'prepare-commit-msg', 'commit-msg', 'post-commit', 'applypatch-msg', 'pre-a...
[ "index.js" ]
[]
true
typicode/husky
1,471
issue_to_patch
Small typo fix
Sorry about the line 80 diff — I edited using the Github GUI. Feel free to close and recreate on your end.
9cef99b8213ac42656c16c059346b5c095a274ac
fa37a6f723efbc6dc4b5317eead6e91d20176c2c
diff --git a/docs/get-started.md b/docs/get-started.md index 2283b404e..719dbbbfe 100644 --- a/docs/get-started.md +++ b/docs/get-started.md @@ -73,8 +73,8 @@ prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') - git update-index --again ``` -_This is a basic but workinkg example, check [...
[ "docs/get-started.md" ]
[]
true
typicode/husky
1,467
issue_to_patch
v9.1.0
da40de3edd1eab39ff28193f748a4efbb05d2d70
23e531ef770167fd1c6247a9d690fe71f88bf7ae
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 51d664ba8..174c96883 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,12 +11,12 @@ jobs: test: strategy: matrix: - node-version: [18, 20] + node-version: [18, 20, 22] ...
[ ".github/workflows/node.js.yml", ".github/workflows/npm_publish.yml", "bin.js", "docs/.vitepress/config.mts", "docs/get-started.md", "docs/index.md", "docs/migrate-from-v4.md", "docs/sponsorkit/sponsors.svg", "husky", "index.d.ts", "index.js", "package.json", "tea.yaml", "test.sh", "test...
[]
diff --git a/test/9_init.sh b/test/10_init.sh similarity index 100% rename from test/9_init.sh rename to test/10_init.sh diff --git a/test/10_time.sh b/test/11_time.sh similarity index 72% rename from test/10_time.sh rename to test/11_time.sh index 89a7cd8c8..9cbcece4f 100755 --- a/test/10_time.sh +++ b/test/11_time.sh...
true
typicode/husky
1,449
issue_to_patch
chore(deps): bump tough-cookie and sponsorkit in /docs
Removes [tough-cookie](https://github.com/salesforce/tough-cookie). It's no longer used after updating ancestor dependency [sponsorkit](https://github.com/antfu/sponsorkit). These dependencies need to be updated together. Removes `tough-cookie` Updates `sponsorkit` from 0.9.1 to 0.9.3 <details> <summary>Release notes...
96979e216d83265fe6363a21beac4d3c4a164846
8db669cdcbdbc8d8dcdfec927c1d76bb86f9f002
diff --git a/docs/package-lock.json b/docs/package-lock.json index d7279bd75..541d2ef34 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "devDependencies": { - "sponsorkit": "^0.9.1", + "sponsorkit": "^0.9.3", "vitepress": "^1.0.1...
[ "docs/package-lock.json", "docs/package.json" ]
[]
true
typicode/husky
1,413
issue_to_patch
docs: add Simplified Chinese documentation
* Add Simplified Chinese documentation * Update vitepress to version 1.0.1
9f6e2123eaa002e0ad37a90645f71a25d1e0b2e9
8b5bbafe5b7792c70f183ddfe17fb77edcc202e7
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 0a77bb4b6..8a4532744 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -23,6 +23,56 @@ export default defineConfig({ { text: 'How To', link: '/how-to' }, { text: 'Troubleshoot', link: '/troubleshoot' }, ...
[ "docs/.vitepress/config.mts", "docs/package-lock.json", "docs/package.json", "docs/zh/get-started.md", "docs/zh/how-to.md", "docs/zh/index.md", "docs/zh/migrate-from-v4.md", "docs/zh/troubleshoot.md" ]
[]
true
typicode/husky
1,333
issue_to_patch
v9
a5c36f582cefd81c3c8c170089bdb63fb5173ed8
b0cdb88ca02ce48cfba9eb86d9e37b2fbdf76eb0
diff --git a/.commitlintrc.json b/.commitlintrc.json deleted file mode 100644 index c30e5a970..000000000 --- a/.commitlintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@commitlint/config-conventional"] -} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..62139e0f0 --- /dev/null...
[ ".commitlintrc.json", ".editorconfig", ".eslintrc.json", ".gitattributes", ".github/README.md", ".github/workflows/deploy.yml", ".github/workflows/node.js.yml", ".github/workflows/npm_publish.yml", ".gitignore", ".husky/commit-msg", ".husky/pre-commit", ".npmignore", ".shellcheckrc", "CONT...
[ { "comment": "I am curious, what guided you to go so far with reducing the package size? Isn't keeping the code readable more valuable than reducing the already small size?\r\n\r\nThanks for your work tho!", "path": "bin.js", "hunk": "@@ -0,0 +1,21 @@\n+#!/usr/bin/env node\n+import f, { writeFileSync as...
diff --git a/test/1_default.sh b/test/1_default.sh old mode 100644 new mode 100755 index 5323688b2..ac0162b8d --- a/test/1_default.sh +++ b/test/1_default.sh @@ -1,17 +1,14 @@ -. "$(dirname -- "$0")/functions.sh" +#!/bin/sh +. test/functions.sh setup install -npx --no-install husky install +npx --no-install husky ...
true
typicode/husky
1,406
issue_to_patch
fix: typo
3ea4e4a1d86c0fde3e1b28e0bc0d6fde769d08c3
653fd0b3bf7fa3a1d658c44a9011907055f351a8
diff --git a/docs/migrate-from-v4.md b/docs/migrate-from-v4.md index 2173b23fd..3a3fc78b4 100644 --- a/docs/migrate-from-v4.md +++ b/docs/migrate-from-v4.md @@ -34,7 +34,7 @@ If you were calling locally installed binaries, **you need to run them via your } ``` -```shell [.husky/commit-msg (v9)] +```shell [.husky/pr...
[ "docs/migrate-from-v4.md" ]
[]
true
typicode/husky
1,404
issue_to_patch
docs: bash
ad6f0b3a5fd78127db46b5f1cc6042e7acb06b16
0a54124c3a11ec5e535e63dde575f32c622d218d
diff --git a/docs/how-to.md b/docs/how-to.md index df116b599..60b25f80d 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -157,6 +157,21 @@ In order to run scripts that require the use of a scripting language, use the fo // ... ``` +## Bash + +Hook scripts need to be POSIX compliant to ensure best compatibi...
[ "docs/how-to.md" ]
[]
true
typicode/husky
1,384
issue_to_patch
V9 Issue - Husky command not found in the PATH - with the hooks code in python Hello, I am currently using Visual Studio Code version 1.85.1, NodeJs version 20, and Husky version 9. I've been using Husky since December, starting with the previous version, and my initial experience was excellent. I had no issues...
Fix #1381 Update how-to.md
Fix #1381 by adding documentation to `how-to.md`
095a4fefbb6b9e57f22bd96f3db0577f5ed427b3
767dabff122d3868adf5b80143aba619d7bb48e0
diff --git a/docs/how-to.md b/docs/how-to.md index ef28ced4a..a03f7e27e 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -131,6 +131,25 @@ cd frontend npm test ``` +## Non-shell hooks + +In order to run scripts that require the use of a scripting language, use the following pattern for each applicable hook: + +(...
[ "docs/how-to.md" ]
[ { "comment": "you might want to add the import for example and the fact you don't need to call husky.install() anymore (if i correct)", "path": "docs/how-to.md", "hunk": "@@ -131,6 +131,25 @@ cd frontend\n npm test\n ```\n \n+## Non-shell hooks\n+\n+In order to run scripts that require the use of a scri...
true
typicode/husky
1,384
comment_to_fix
Fix #1381 Update how-to.md
you might want to add the import for example and the fact you don't need to call husky.install() anymore (if i correct)
095a4fefbb6b9e57f22bd96f3db0577f5ed427b3
767dabff122d3868adf5b80143aba619d7bb48e0
diff --git a/docs/how-to.md b/docs/how-to.md index ef28ced4a..a03f7e27e 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -131,6 +131,25 @@ cd frontend npm test ``` +## Non-shell hooks + +In order to run scripts that require the use of a scripting language, use the following pattern for each applicable hook: + +(...
[ "docs/how-to.md" ]
[ { "comment": "you might want to add the import for example and the fact you don't need to call husky.install() anymore (if i correct)", "path": "docs/how-to.md", "hunk": "@@ -131,6 +131,25 @@ cd frontend\n npm test\n ```\n \n+## Non-shell hooks\n+\n+In order to run scripts that require the use of a scri...
true
typicode/husky
1,389
issue_to_patch
docs: info about adding a new hook
description is taken from https://github.com/typicode/husky/releases/tag/v9.0.1
095a4fefbb6b9e57f22bd96f3db0577f5ed427b3
84bf2efcb88d1cebf6c88881b28016c9973d9077
diff --git a/docs/how-to.md b/docs/how-to.md index ef28ced4a..1dd46aa00 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -1,5 +1,12 @@ # How To +## Adding a New Hook + +Adding a hook is as simple as creating a file. This can be accomplished using your favorite editor, a script or a basic echo command. For example...
[ "docs/how-to.md" ]
[]
true
typicode/husky
1,395
issue_to_patch
fix: husky=0 in init
095a4fefbb6b9e57f22bd96f3db0577f5ed427b3
1c9fe32212f4066f4f224cb77c5f11a24b7a39db
diff --git a/husky b/husky index 8d2aa3f85..86bd0ba5f 100644 --- a/husky +++ b/husky @@ -1,6 +1,5 @@ #!/usr/bin/env sh -H="$HUSKY" -[ "$H" = "2" ] && set -x +[ "$HUSKY" = "2" ] && set -x h="${0##*/}" s="${0%/*/*}/$h" @@ -11,7 +10,7 @@ for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc"; do ...
[ "husky", "test.sh", "test/10_time.sh", "test/7_set_u.sh", "test/8_husky_0.sh", "test/9_init.sh", "test/functions.sh" ]
[]
diff --git a/test/8_time.sh b/test/10_time.sh similarity index 100% rename from test/8_time.sh rename to test/10_time.sh diff --git a/test/7_set_u.sh b/test/7_set_u.sh new file mode 100644 index 000000000..6767e7a1a --- /dev/null +++ b/test/7_set_u.sh @@ -0,0 +1,15 @@ +#!/bin/sh +. test/functions.sh +setup +install + +...
true
typicode/husky
1,383
issue_to_patch
chore: update package-lock.json
c042d9b4d409caaa9be48e1e635359931c944760
a292010201ca09703fa0d4b75fd08f3bf98446b7
diff --git a/package-lock.json b/package-lock.json index 9c96016c3..36586ae8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "9.0.10", "license": "MIT", "bin": { - "husky": "bin.js" + "husky": "bin.mjs" }, "engines": { "node": ">=18"
[ "package-lock.json" ]
[]
true
typicode/husky
1,378
issue_to_patch
refactor: rename files
211b80ada3b37e1d3fbae00c69758b75e47fe03a
f858a9a3c5e89d535a9dde3b346fab7315e864f8
diff --git a/bin.js b/bin.mjs similarity index 95% rename from bin.js rename to bin.mjs index 2f1c3be39..d954ed9ac 100755 --- a/bin.js +++ b/bin.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node import f, { writeFileSync as w } from 'fs' -import i from './index.js' +import i from './index.mjs' let p, a, n, s, o, d diff --...
[ "bin.mjs", "husky", "index.mjs", "package.json" ]
[]
true
typicode/husky
1,376
issue_to_patch
Fix tab detection on install command
See https://github.com/typicode/husky/commit/ec13855c167bcead06523ae43ca1b5152d77810f#r138138417
798f1ad7b5ec26a1daa75b03b09155e9fcc6e921
a1066c6d9d95e8ea49869e8afd4b50a11504e879
diff --git a/bin.js b/bin.js index 9d98ccf50..275f026f2 100755 --- a/bin.js +++ b/bin.js @@ -6,9 +6,10 @@ let a = process.argv[2] if (a == 'init') { let p = 'package.json' - let d = JSON.parse(f.readFileSync(p)) + let s = f.readFileSync(p); + let d = JSON.parse(s) ; (d.scripts ||= {}).prepare = 'husky' - w('pac...
[ "bin.js" ]
[]
true
typicode/husky
1,379
issue_to_patch
fix: rename index.d.ts to index.d.mts
Title says it all. Fixes https://github.com/typicode/husky/pull/1378#issuecomment-1921706627
6219cac421679c7714f8ea91f94c9e163244914f
aacb8691601d4caabbfe5ec41395d00b05c456b5
diff --git a/index.d.ts b/index.d.mts similarity index 100% rename from index.d.ts rename to index.d.mts
[ "index.d.mts" ]
[]
true
typicode/husky
1,377
issue_to_patch
refactor: reduce file size
d09132834bcd1b482a729a4cb3b9ccca54ee9a08
72667621d3481966ee9f2a315b8a000b3ccc9dc3
diff --git a/bin.js b/bin.js index 275f026f2..2f1c3be39 100755 --- a/bin.js +++ b/bin.js @@ -2,22 +2,25 @@ import f, { writeFileSync as w } from 'fs' import i from './index.js' -let a = process.argv[2] +let p, a, n, s, o, d + +p = process +a = p.argv[2] if (a == 'init') { - let p = 'package.json' - let s = f.rea...
[ "bin.js" ]
[]
true
typicode/husky
1,348
issue_to_patch
fix: init create dir before
417568d8ff0394099684feda593e7133ce990100
2033052fd0851ac9033c2449c18296292e97101b
diff --git a/bin.js b/bin.js index b352c2257..5c54f50ec 100755 --- a/bin.js +++ b/bin.js @@ -11,6 +11,7 @@ if (a == 'init') { d.scripts.prepare = 'husky' w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n') process.stdout.write(i()) + try { f.mkdirSync('.husky') } catch {} w('.husky/pre...
[ "bin.js" ]
[ { "comment": "unidented commit. seems to use tab while rest of the code use spaces", "path": "bin.js", "hunk": "@@ -11,6 +11,7 @@ if (a == 'init') {\n d.scripts.prepare = 'husky'\n w('package.json', JSON.stringify(d, null, /\\t/.test() ? '\\t' : 2) + '\\n')\n process.stdout.write(i())\n+\ttry { f....
true
typicode/husky
1,359
issue_to_patch
HUSKY: unbound variable ```shell .husky/_/h: line 13: HUSKY: unbound variable ``` **Context** ~/.config/husky/init.sh ```shell #!/usr/bin/env sh set -eu [ -e /etc/zshenv ] && . /etc/zshenv [ -e "${ZDOTDIR:=${HOME}}/.zshenv" ] && . "${ZDOTDIR:=${HOME}}/.zshenv" [ -e /etc/zprofile ] && . /etc/zprofile ...
Fix unbound variable
Fixes #1358
e7ada20240c9f8b1501e4f94cb0c28b2811e8eb9
e6b2d0f0eb42e635ea1462d362d8fe36e67ced6f
diff --git a/husky.sh b/husky.sh index 2467495b8..427840b72 100644 --- a/husky.sh +++ b/husky.sh @@ -1,5 +1,6 @@ #!/usr/bin/env sh -[ "$HUSKY" = "2" ] && set -x +H="$HUSKY" +[ "$H" = "2" ] && set -x h="${0##*/}" s="${0%/*/*}/$h" @@ -10,7 +11,7 @@ for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.h...
[ "husky.sh" ]
[ { "comment": "this doesn't fix anything, you still have unbound `$HUSKY` access. what you should had done is `H=\"${HUSKY:-}\"` which was actually described in https://github.com/typicode/husky/issues/1358 issue body.", "path": "husky.sh", "hunk": "@@ -1,5 +1,6 @@\n #!/usr/bin/env sh\n-[ \"$HUSKY\" = \"...
true
typicode/husky
1,369
issue_to_patch
Update index.md
wrong url routing to wrong md file, changed that
800fbf1744c306dc328c47d6ef52829721f48378
a4c922d862578da85049fb5f4030ea14978fae9d
diff --git a/docs/index.md b/docs/index.md index 8412c0f80..46e8f40ab 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,7 +6,7 @@ Husky enhances your commits and more 🐶 _woof!_ Automatically **lint your commit messages**, **code**, and **run tests** upon committing or pushing. -Get started [here](/get-started)...
[ "docs/index.md" ]
[]
true
typicode/husky
1,347
issue_to_patch
fix: fix init not work on pnpm #1334
`npm_package_json` env is not supported by pnpm now. (but npm and yarn works) This is not a perfect fix, the user may not run husky init in project root. in this case, we need more code that npm and yarn user doest't need, I think this is unfair. So, we can simple add one line here utill the pnpm support it. T...
f874dfb9415871c7df7bad2520a3cfd4bbecba11
f0d6b4f4f1ce8c5cfb1336f274e3cc88969b300a
diff --git a/bin.js b/bin.js index 17fc9030c..11164946d 100755 --- a/bin.js +++ b/bin.js @@ -5,7 +5,7 @@ import i from './index.js' let a = process.argv[2] if (a == 'init') { - let p = process.env.npm_package_json + let p = 'package.json' let d = JSON.parse(f.readFileSync(p)) (d.scripts ||= {}).prepare = 'h...
[ "bin.js" ]
[ { "comment": "why not still use the env, but fallback if missing:\r\n\r\n```js\r\nlet p = process.env.npm_package_json || 'package.json'\r\n```", "path": "bin.js", "hunk": "@@ -5,7 +5,7 @@ import i from './index.js'\n let a = process.argv[2]\n \n if (a == 'init') {\n- let p = process.env.npm_package_j...
true