Skip to content

Commit

Permalink
Merge pull request #1090 from NullVoxPopuli/only-allow-the-root-import
Browse files Browse the repository at this point in the history
Remove the 'core' import, only allowing importing from 'ember-resources'
  • Loading branch information
NullVoxPopuli authored Jan 9, 2024
2 parents be18432 + b3afce6 commit 837ee4f
Show file tree
Hide file tree
Showing 18 changed files with 7 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .github/actions/assert-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ runs:
run: pnpm build
cwd: ./ember-resources
expect: |
core/index.js
core/function-based/index.js
index.js
index.js.map
index.d.ts
Expand Down
5 changes: 0 additions & 5 deletions ember-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@
"license": "MIT",
"exports": {
".": "./dist/index.js",
"./core": "./dist/core/index.js",
"./core/function-based": "./dist/core/function-based/index.js",
"./addon-main.js": "./addon-main.cjs"
},
"typesVersions": {
">=4.0.0": {
"*": [
"dist/*"
],
"core": [
"dist/core/index.d.ts"
]
}
},
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion ember-resources/src/core/index.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions ember-resources/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Public API -- base classes
export { resource, resourceFactory } from './core/function-based';
export { use } from './core/use';
export { resource, resourceFactory } from './function-based';
export { use } from './use';

// Public API -- Utilities
export { cell } from './core/cell';
export { cell } from './cell';

// Public Type Utilities
export type { ResourceAPI } from './core/function-based';
export type { Reactive } from './core/function-based/types';
export type { ArgsWrapper, ExpandArgs, Thunk } from './core/types';
export type { ResourceAPI } from './function-based';
export type { Reactive } from './function-based/types';
export type { ArgsWrapper, ExpandArgs, Thunk } from './types';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions ember-resources/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
// Lazy import settings, affects build time only
// because these aliases are only used for type imports
"paths": {
"[core-types]": ["./src/core/types"],
"[deprecated-types]": ["./src/deprecated-in-v4/types"]
"[core-types]": ["./src/types"]
}
}
}

0 comments on commit 837ee4f

Please sign in to comment.