Skip to content

Commit

Permalink
Add JSDocs to generated projects (#1334)
Browse files Browse the repository at this point in the history
* Ensure i18n templates don't use imported types directly

* Move declaration of I18nLocale type to ambient file

* Add tests for i18n replacers

* Fix routes flag in init

* Fix markets flag in init

* Support d.ts for JS in i18n replacers

* Add new init option to preserve d.ts in JS

* Remove option for JSDocs and do it by default

* Compile TS types to JSDocs

* Annotate default exported object properties

* Add JSDocs for i18n extractor

* Refactor: split code in files and add license notice

* Use JSDoc style comment

* Cleanup

* Changesets

* Update default jsconfig

* Update changeset

* Update ts-morph version

* Update package.jsons

* Update test snapshots

* NPM dedup to fix tests

* Fix Node type

* Update test timeout
  • Loading branch information
frandiox authored Oct 18, 2023
1 parent b81b452 commit e992de2
Show file tree
Hide file tree
Showing 29 changed files with 6,256 additions and 3,965 deletions.
6 changes: 6 additions & 0 deletions .changeset/honest-foxes-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/cli-hydrogen': minor
'@shopify/create-hydrogen': minor
---

Generated JavaScript projects now use Codegen and JSDoc to enhance editor autocompletion.
6 changes: 3 additions & 3 deletions examples/customer-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"dependencies": {
"@remix-run/react": "1.19.1",
"@shopify/cli": "3.49.2",
"@shopify/cli-hydrogen": "^5.1.0",
"@shopify/hydrogen": "^2023.7.0",
"@shopify/cli-hydrogen": "^5.4.3",
"@shopify/hydrogen": "^2023.7.11",
"@shopify/remix-oxygen": "^1.1.1",
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
Expand All @@ -29,7 +29,7 @@
"@shopify/oxygen-workers-types": "^3.17.2",
"@shopify/prettier-config": "^1.1.2",
"@types/eslint": "^8.4.10",
"@types/react": "^18.2.22",
"@types/react": "^18.2.22",
"@types/react-dom": "^18.2.7",
"eslint": "^8.20.0",
"eslint-plugin-hydrogen": "0.12.2",
Expand Down
6 changes: 3 additions & 3 deletions examples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@remix-run/express": "1.19.1",
"@remix-run/node": "1.19.1",
"@remix-run/react": "1.19.1",
"@shopify/hydrogen": "^2023.7.0",
"@shopify/hydrogen": "^2023.7.11",
"compression": "^1.7.4",
"cross-env": "^7.0.3",
"express": "^4.18.2",
Expand All @@ -28,11 +28,11 @@
"@remix-run/dev": "1.19.1",
"@remix-run/eslint-config": "1.19.1",
"@shopify/cli": "3.49.2",
"@shopify/cli-hydrogen": "^5.1.0",
"@shopify/cli-hydrogen": "^5.4.3",
"@types/compression": "^1.7.2",
"@types/express": "^4.17.17",
"@types/morgan": "^1.9.4",
"@types/react": "^18.2.22",
"@types/react": "^18.2.22",
"@types/react-dom": "^18.2.7",
"dotenv": "^16.0.3",
"eslint": "^8.38.0",
Expand Down
Loading

0 comments on commit e992de2

Please sign in to comment.