From dc8187b287f235af0bb123724e32e99e85ebe035 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sun, 21 May 2023 11:32:54 -0400 Subject: [PATCH 1/3] Add note for workaround for --typescript issues --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 8b8f6a49..b5259ed3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,28 @@ This is still work in progress. The blueprint contains a number of assumptions, e.g. using a monorepo using (`yarn` or `npm`) workspaces, with separate workspaces for the addon and the test-app. But there is plenty of room for bikeshedding here, so if you have suggestions about better ways to set this up, then please file an issue to discuss! +### Temporary work-around for `--typescript` issues + +Today, `--typescript` is implemented via differing to `ember-cli`'s `--typescript` when generating the test-app. +This has a number of issues: + - `ember-cli-typescript` is very out of date + - remove `@types/ember__test-helpers` and `@types/ember-test-helpers` (`@ember/test-helpers` provides its own types) + - peer issues with ember-cli cause the generation of a whole project to be deleted by ember-cli + - the package manager is ignored when ember-cli defers to `ember-cli-typescript`s blueprint + - there is no way to opt out of ember-cli installing dependencies when using `--typescript` + +To make a monorepo manually: +```bash +mkdir my-monorepo +cd my-monorepo +git init +touch package.json # make sure to fill this out +npx ember-cli@latest addon my-addon -b @embroider/addon-blueprint --skip-git --skip-npm --typescript --addon-only +npx ember-cli@latest new test-app --skip-git --skip-npm --typescript # make sure to add the addon as a dependency in the test-app +``` + +We're actively trying to make this situation better, but this is what we have to deal with until `--typescript` support in ember-cli is more stable (and maybe uses the built-in types). + ## Usage ```bash From 53925d9099809bfb5f7f2a7bae579ff29725c28d Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sun, 21 May 2023 11:37:33 -0400 Subject: [PATCH 2/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b5259ed3..dfb043f9 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ Today, `--typescript` is implemented via differing to `ember-cli`'s `--typescrip This has a number of issues: - `ember-cli-typescript` is very out of date - remove `@types/ember__test-helpers` and `@types/ember-test-helpers` (`@ember/test-helpers` provides its own types) + - released infrequently + - it's being sunset anyway - peer issues with ember-cli cause the generation of a whole project to be deleted by ember-cli - the package manager is ignored when ember-cli defers to `ember-cli-typescript`s blueprint - there is no way to opt out of ember-cli installing dependencies when using `--typescript` From f78a829ed985bf8375a83487b1168f6764ef6664 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sun, 21 May 2023 11:44:04 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dfb043f9..4455a928 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,10 @@ The blueprint contains a number of assumptions, e.g. using a monorepo using (`ya Today, `--typescript` is implemented via differing to `ember-cli`'s `--typescript` when generating the test-app. This has a number of issues: - `ember-cli-typescript` is very out of date - - remove `@types/ember__test-helpers` and `@types/ember-test-helpers` (`@ember/test-helpers` provides its own types) - - released infrequently - - it's being sunset anyway + - you'll need to remove `@types/ember__test-helpers`, `@types/ember-resolver`, and `@types/ember__string` (these provide their own types now) + - it's being sunset anyway, as effort is being put in to making TS support more native and less reliant on DefinitelyTyped. - peer issues with ember-cli cause the generation of a whole project to be deleted by ember-cli - - the package manager is ignored when ember-cli defers to `ember-cli-typescript`s blueprint + - the package manager is ignored when ember-cli defers to `ember-cli-typescript`s blueprint (this mostly only affects `--pnpm` using projects) - there is no way to opt out of ember-cli installing dependencies when using `--typescript` To make a monorepo manually: @@ -30,6 +29,7 @@ mkdir my-monorepo cd my-monorepo git init touch package.json # make sure to fill this out +touch pnpm-workspace.yaml # if you're using pnpm npx ember-cli@latest addon my-addon -b @embroider/addon-blueprint --skip-git --skip-npm --typescript --addon-only npx ember-cli@latest new test-app --skip-git --skip-npm --typescript # make sure to add the addon as a dependency in the test-app ```