Skip to content

Commit

Permalink
Revert: using a separate workspace for DT types. tsc does not respect…
Browse files Browse the repository at this point in the history
… dependency isolation
  • Loading branch information
NullVoxPopuli committed Jan 10, 2024
1 parent ee2884e commit d11bb79
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 610 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,30 @@ jobs:
run: pnpm --filter "test-app" exec glint;

- name: 'Type checking (DefinitelyTyped types)'
run: pnpm --filter "test-app-definitely-typed" exec glint;
# run: |
# library="$PWD/ember-resources"
# separate_app="/tmp/dt-types-test-app"
# # Be *very* sure we have a fresh directory
# rm -rf $separate_app
# mkdir -p $separate_app
# # Remove node_modules so that copying goes faster
# rm -rf test-app/node_modules
# # Remove the import of the built-in-types
# rm test-app/types/index.d.ts
# # Copy the test app to the new location
# cp test-app $separate_app/ -r
# # Set up the test-app
# cd $separate_app/test-app
# pnpm remove ember-resources
# pnpm add $library
# # verify we added the correct thing
# cat package.json | grep ember-resources
# pnpm add --save-dev @types/ember @types/ember__helper @types/ember__modifier @types/ember__owner @types/ember__application @types/ember__debug @types/ember__destroyable @types/ember__object @types/ember__runloop @types/ember__service @types/ember__routing
# pnpm i -f
# pnpm exec glint
# We can't have DT types and built in types in the same repo.
# The types collide and are not compatible with each other.
# run: pnpm --filter "test-app-definitely-typed" exec glint;
run: |
library="$PWD/ember-resources"
separate_app="/tmp/dt-types-test-app"
# Be *very* sure we have a fresh directory
rm -rf $separate_app
mkdir -p $separate_app
# Remove node_modules so that copying goes faster
rm -rf test-app/node_modules
# Remove the import of the built-in-types
rm test-app/types/index.d.ts
# Copy the test app to the new location
cp test-app $separate_app/ -r
# Set up the test-app
cd $separate_app/test-app
pnpm remove ember-resources
pnpm add $library
# verify we added the correct thing
cat package.json | grep ember-resources
pnpm add --save-dev @types/ember @types/ember__helper @types/ember__modifier @types/ember__owner @types/ember__application @types/ember__debug @types/ember__destroyable @types/ember__object @types/ember__runloop @types/ember__service @types/ember__routing
pnpm i -f
pnpm exec glint
Expand Down
4 changes: 2 additions & 2 deletions ember-resources/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"allowImportingTsExtensions": true,

// require extensions
"module": "Node16",
"moduleResolution": "Node16",
// "module": "Node16",
// "moduleResolution": "Node16",

// https://www.typescriptlang.org/tsconfig#stripInternal
"stripInternal": true,
Expand Down
Loading

0 comments on commit d11bb79

Please sign in to comment.