Comments (6)
Hey, thanks guys 👋
It feels reasonable for me to provide a few test scenarios to check the build against a couple of major typescript versions. Probably via ember-try scenarios...
I'll appreciate a PR! Otherwise, I'll try to take a look on a fix this weekend.
from ember-cli-page-object.
As I said, I'm pretty sure this has nothing to do with the typescript version, but rather using "moduleResolution": 'bundler'
. I ran into this because my project uses @tsconfig/ember
as the base for tsconfig.json
and when I upgraded from v2 to v3 (which switches the moduleResolution
) I started running into this error.
So you might be able to get a failing test by updating the test app to extend @tsconfig/ember
and then have an ember-try
scenario that uses v3
of @tsconfig/ember
. Since this is a v2 addon, you could also just write a separate test app to test this scenario 🤷
from ember-cli-page-object.
I've opened #614 to address this. Please let me know if you have any feedback, happy to iterate on this.
Thanks @bendemboski for the tips!
from ember-cli-page-object.
Further context -- I believe this is specifically related to using "moduleResolution": 'bundler'
, and this patch (applied via patch-package
or similar) fixes it for me:
diff --git a/node_modules/ember-cli-page-object/package.json b/node_modules/ember-cli-page-object/package.json
index cddb866..e92c917 100644
--- a/node_modules/ember-cli-page-object/package.json
+++ b/node_modules/ember-cli-page-object/package.json
@@ -25,7 +25,10 @@
"license": "MIT",
"author": "Santiago Ferreira",
"exports": {
- ".": "./dist/index.js",
+ ".": {
+ "import": "./dist/index.js",
+ "types": "./types.d.ts"
+ },
"./*": "./dist/*",
"./addon-main.js": "./addon-main.js"
},
from ember-cli-page-object.
When I update package.json
as follows:
"exports": {
".": {
"import": "./dist/index.js",
"types": "./types.d.ts"
},
"./*": "./dist/*",
"./addon-main.js": "./addon-main.js"
},
... then tsc --noEmit
passes, but ember build
fails with the following error:
ERROR in ../../../../private/var/folders/7s/082kb7n942s1xm4t8_tpb65r0000gn/T/broccoli-20572FT45LJQ4uBmn/cache-574-webpack_bundler_ember_auto_import_webpack/tests.cjs 15:102-134
Module not found: Error: Package path . is not exported from package /private/var/folders/7s/082kb7n942s1xm4t8_tpb65r0000gn/T/broccoli-20572FT45LJQ4uBmn/cache-574-webpack_bundler_ember_auto_import_webpack/node_modules/ember-cli-page-object (see exports field in /private/var/folders/7s/082kb7n942s1xm4t8_tpb65r0000gn/T/broccoli-20572FT45LJQ4uBmn/cache-574-webpack_bundler_ember_auto_import_webpack/node_modules/ember-cli-page-object/package.json)
cleaning up...
Build Error (WebpackBundler)
webpack returned errors to ember-auto-import
However the following works for me with both tsc --noEmit
and ember build
.
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.js",
"types": "./types.d.ts"
},
"./*": {
"import": "./dist/*",
"require": "./dist/*",
"types": "./types.d.ts"
},
"./addon-main.js": {
"import": "./addon-main.js",
"require": "./addon-main.js",
"types": "./types.d.ts"
}
},
I was able to make some progress adding a new ember-try
scenario, but currently the scenario passes even without the accompanying change to package.json
.
{
name: 'ember-release-typescript-5',
npm: {
devDependencies: {
'@ember/string': '^3.1.1',
'ember-cli-typescript': '^5.2.1',
'ember-resolver': '^10.1.1',
'ember-source': await getChannelURL('release'),
'typescript': '^5.1.6',
},
},
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': false,
}),
},
}
from ember-cli-page-object.
Just published the fix https://github.com/san650/ember-cli-page-object/releases/tag/v2.1.0. Thanks everyone!
from ember-cli-page-object.
Related Issues (20)
- Clicking on text with comma produces a deprecation warning HOT 1
- How to replace deprecated `is(':focus')`? HOT 3
- Errors running tests since upgrading to v5 of `ember-qunit` HOT 7
- Deprecation calls need to be updated for compat with Ember 3.24 HOT 2
- Incompatible with Embroider 's `staticAddonTestSupportTrees` optimized mode HOT 10
- new deprecation: `create-url-argument` *always* throws when an object is passed to create. HOT 4
- Query Engines
- Assign is being referenced from @ember/polyfills. This prevents upgrade to Ember 4 HOT 4
- Update ember-cli-babel HOT 5
- migrate to v2 Addon Format HOT 4
- Types require allowSyntheticDefaultImports=true HOT 2
- Replace usage of ember-native-dom-helpers by @ember/test-helpers HOT 1
- is there a way to create recursive page object? HOT 2
- docs: clickable needs to be awaited HOT 2
- All imports must be declared as dependencies or peers HOT 3
- [Quest] Remove jquery
- get rid of `$.param(`
- `$.prop(`
- deprecate finders `scope` option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-page-object.