by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 06 06:22
    rhpijnacker commented #1168
  • Jul 06 05:50
    github-actions[bot] labeled #1168
  • Jul 06 05:50
    rhpijnacker opened #1168
  • Jun 17 06:34
    github-actions[bot] labeled #1167
  • Jun 17 06:34
    rhpijnacker opened #1167
  • Jun 08 21:26
    msssk commented #1165
  • Jun 08 21:24
    msssk commented #1165
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 opened #1166
  • Jun 08 13:25
    jason0x43 commented #1165
  • Jun 06 15:50

    jason0x43 on oclif-test

    (compare)

  • Jun 05 01:22

    jason0x43 on 4.8.7

    (compare)

  • Jun 05 01:22

    jason0x43 on 4.8

    Updating metadata for 4.8.7 Updating source version to 4.8.… (compare)

  • Jun 05 00:54
    jason0x43 commented #80
  • Jun 05 00:54
    jason0x43 commented #80
  • Jun 05 00:54
    jason0x43 labeled #80
  • Jun 04 15:07

    jason0x43 on 4.8

    chore: update Intern config sch… chore: update schema Improve h… feat: add support for 'internLo… and 1 more (compare)

Khobab
@khobabc
They sure are :-)
we are using Intern 4 with dojo and we have started using TypeScript with dojo typings so tests are in ts.
Khobab
@khobabc
and now when we do npm run tsc to compile type script we see following errors in compilation.

node_modules/@theintern/digdug/BrowserStackTunnel.d.ts:2:36 - error TS2307: Cannot find module '@theintern/common'.

2 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/digdug/interfaces.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 export { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/digdug/SeleniumTunnel.d.ts:3:36 - error TS2307: Cannot find module '@theintern/common'.

3 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/digdug/Tunnel.d.ts:2:66 - error TS2307: Cannot find module '@theintern/common'.

2 import { Evented, EventObject, Handle, CancellablePromise } from '@theintern/common';
                                                                   ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Command.d.ts:3:36 - error TS2307: Cannot find module '@theintern/common'.

3 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Element.d.ts:2:36 - error TS2307: Cannot find module '@theintern/common'.

2 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/interfaces.d.ts:2:36 - error TS2307: Cannot find module '@theintern/common'.

2 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Server.d.ts:1:52 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise, RequestOptions } from '@theintern/common';
                                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@theintern/leadfoot/Session.d.ts:4:36 - error TS2307: Cannot find module '@theintern/common'.

4 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/@types/istanbul-lib-instrument/index.d.ts:8:30 - error TS2307: Cannot find module 'source-map'.

8 import { RawSourceMap } from 'source-map';
                               ~~~~~~~~~~~~

node_modules/@types/istanbul-lib-source-maps/index.d.ts:8:30 - error TS2307: Cannot find module 'source-map'.

8 import { RawSourceMap } from 'source-map';
                               ~~~~~~~~~~~~

node_modules/intern/lib/BenchmarkTest.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/channels/Base.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/executors/Executor.d.ts:2:44 - error TS2307: Cannot find module '@theintern/common'.

2 import { Handle, CancellablePromise } from '@theintern/common';
                                             ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/executors/Node.d.ts:4:36 - error TS2307: Cannot find module '@theintern/common'.

4 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/RemoteSuite.d.ts:1:36 - error TS2307: Cannot find module '@theintern/common'.

1 import { CancellablePromise } from '@theintern/common';
                                     ~~~~~~~~~~~~~~~~~~~

node_modules/intern/lib/reporters/Benchmark.d.ts:22:22 - error TS2694: Namespace '"C:/Users/Khobab/Documents/webapps/node_modules/intern/lib/reporters/Benchmark"' has no exported member 'Times'.

22     times: Benchmark.Times;
                        ~~~~~

node_modules/intern/lib/Server.d.ts:5:24 - error TS2307: Cannot find module '@theintern/common'.

5 import { Handle } from '@theintern/common';
                         ~~~~~~~~~~~~
I am not sure how we can fix these. Any help would be much appreciated.
Jason Cheatham
@jason0x43
What version of Intern are you using?
Khobab
@khobabc
"intern": "4.8.0",
But I have also tried with 4.8.4 and it does not matter
Jason Cheatham
@jason0x43
Do you have node_modules/@theintern/common?
Khobab
@khobabc
yes, it exists.
Jason Cheatham
@jason0x43
What does your tsconfig look like? In particular, what is the value for moduleResolution?
Khobab
@khobabc
{
  "compilerOptions": {
    "noImplicitAny": true,
    "noImplicitUseStrict": true,
    "noEmitOnError": false,
    "module": "amd",
    "moduleResolution": "classic",
    "target": "es5",
    "sourceMap": true,
    "experimentalDecorators": true,
    "types": ["intern"],
    "baseUrl": ".",
    "paths": {
        "abc/*": ["src/abc/*"],
        "def/*": ["src/def/*"]
    }
  },
  "exclude": [
    "node_modules"
  ],
  "include": [
    "src/**/*",
    "tests/unit/**/*"
  ],
  "files": [
    "./node_modules/dojo-typings/dojo/1.11/index.d.ts",
    "./node_modules/dojo-typings/dojo/1.11/modules.d.ts",
    "./node_modules/dojo-typings/dijit/1.11/index.d.ts",
    "./node_modules/dojo-typings/dijit/1.11/modules.d.ts",
    "./node_modules/dojo-typings/dojox/1.11/index.d.ts",
    "./node_modules/dojo-typings/dojox/1.11/modules.d.ts",
    "./node_modules/dojo-typings/dojox/1.11/html/entities.d.ts",
    "./node_modules/dojo-typings/custom/dgrid/1.1/dgrid.d.ts",
    "./node_modules/dojo-typings/custom/dstore/1.1/dstore.d.ts"
  ]
}
You can see tsconfig above.
I do not have separate files for src and tests, there is only one file at the base.
Jason Cheatham
@jason0x43
Can you set moduleResolution to node? (Will that work with your app?)
Khobab
@khobabc
I have tried that too just to check but does not think it works. I can try that again.
ah, btw it worked with moduleResolution node.
Not sure why it did not work earlier.
I have to check with my lead if this module resolution would work and smoke test the app.
Jason Cheatham
@jason0x43
:thumbsup:
Khobab
@khobabc
Just one more question, is there a way to not change the module resolution and resolve this?
Jason Cheatham
@jason0x43

You may be able to use paths, like

{
  "compilerOptions": {
    "paths": {
      "@theintern/common": ["node_modules/@theintern/common/index"],
      "source-map": ["node_modules/source-map/source-map"]
    }
}

However, you may still run into issues because modules published through npm are going to assume node-based module resolution.

Khobab
@khobabc
ahaan.
Thank you very much for your help.
Dylan Staley
@dstaley
Did 4.8.4 break compatibility with older versions of Chrome? It looks like my GitHub workflows are failing on the 4.8.4 upgrade saying ChromeDriver only supports Chrome 83. GitHub Actions use Chrome 81.
Jason Cheatham
@jason0x43

Funny, someone else just pinged me because GHA recently updated to Chrome 83 and their tests started failing. :grinning: Intern's policy is to track the current stable versions of webdrivers by default. If you need to pin to a specific driver version, you can do that using tunnelOptions.drivers:

{
  "tunnelOptions": {
    "drivers": [
      { "name": "chrome", "version": "81..." }
    ]
  }
}

We can actually make that a bit easier with GHA, because (at least according to their release notes) they publish something to a CHROMEWEBDRIVER environment variable in the container. I haven't checked to see what that contains, though (path to an exe, version number, ...).

Dylan Staley
@dstaley
oh huh maybe it's failing because Chrome is actually v83 and ChromeDriver can't properly detect it?
Jason Cheatham
@jason0x43
4.8.4 uses the chromedriver for Chrome 81 by default, so you'd need to pin to a v83 chromedriver. Intern 4.8.5 (published yesterday) checks for updated webdriver versions when you run tests, so it should stay up-to-date.
Dylan Staley
@dstaley
Oh, sorry, it's actually v4.8.5 that's breaking
This version of ChromeDriver only supports Chrome version 83
Jason Cheatham
@jason0x43
Ah, yeah, being on 4.8.5 would make more sense with that error.
It looks like you're using a Windows environment?
Dylan Staley
@dstaley
Yup, the Windows 2019 environment, which as of seven days ago is using chrome 81 (at least according to this https://github.com/actions/virtual-environments/blame/master/images/win/Windows2019-Readme.md#L573)
Jason Cheatham
@jason0x43
Hmm...the release notes for the most recent release (3 days ago) says it's on Chrome 83. (https://github.com/actions/virtual-environments/releases/tag/win19%2F20200524.1)
In any case. the solution is still to pin the chromedriver version to something compatible with the target environment.
It would be useful to be able to easily make use of the environment variable, though. The Windows release notes point out that it points to the driver exe. so that's useful to know. I'll create an issue for it...
Dylan Staley
@dstaley
So intern always downloads the latest version of the driver? Would it make sense to provide an option to download the driver that matches the installed version of Chrome?
Because I can pin to v81 to get tests passing now, but in a few days when the environment updates to v83 I'm gonna have the same issue.
I guess I could, in CI, interpolate the chrome version into the config?
Jason Cheatham
@jason0x43
Intern does download the latest version as that's the most common use case. Detecting the local version would be useful, but tricky, particularly if the browser being used was in a non-standard location.
Being able to use environment variables in the config would handle the GHA case (and would be generally useful). You can already use an INTERN_ARGS environment variable to pass command line options, but it's not very ergonomic for something like this.
Dylan Staley
@dstaley
So the best solution for right now would be updating the config with the value from the CHROMEDRIVER variable?
Jason Cheatham
@jason0x43
Unfortunately, there isn't a way to configure a path to a local webdriver executable, so the best solution for the moment is to pin the version in the config. Depending on the format of their CHROMEWEBDRIVER variable, you might be able to extract the local version from that and use it to set the webdriver version.
Dylan Staley
@dstaley
Yeah that's what I'll try. I'll report the format in the issue
Jason Cheatham
@jason0x43
:thumbsup:
Dylan Staley
@dstaley
Wait, it looks like GHA is installing ChromeDriver in addition to Chrome. Can intern pick up on that since it's in the PATH?
Dylan Staley
@dstaley
Ah okay nevermind, looks like the issue encompasses updating digdug to accept a path to an executable
Dylan Staley
@dstaley
When pinning a webdriver version, should tunnelOptions go at the root of the config?
Jason Cheatham
@jason0x43
Yes.
{
  "tunnelOptions": {
    "drivers": [ { "name": "chrome", "version": "81.xxx" } ]
  }
}