Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog
Changed
@babel/runtime@7.14.8botframework-streaming@4.14.1buffer@6.0.3core-js@3.15.2cross-fetch@3.1.4rxjs@5.5.12url-search-params-polyfill@8.1.1@babel/cli@7.14.8@babel/core@7.14.8@babel/plugin-transform-runtime@7.14.5@babel/preset-env@7.14.8@babel/preset-typescript@7.14.5@types/jest@26.0.24@types/jsonwebtoken@8.5.4@types/node@16.4.0babel-loader@8.2.2babel-jest@27.0.6babel-plugin-istanbul@6.0.0concurrently@6.2.0dotenv@10.0.0event-target-shim@6.0.2get-port@5.1.1global-agent@2.2.0jest@27.0.6jest-environment-jsdom@27.0.6jsdom@16.6.0nock@13.1.1node-fetch@2.6.1restify@8.5.1rimraf@3.0.2simple-update-in@2.2.0typescript@4.3.5webpack@5.45.1webpack-cli@4.7.2webpack-stats-plugin@1.0.3Notably changes
Bufferfrombufferpackage, instead of from globaljest@27windowobjectuuidwill fail because lack of Web Crypto__tests__/setup/setupCrypto.jsAccess-Control-Allow-Originon the GET/POST, even though it has it in the OPTIONS responseAccess-Control-Allow-Originexplicitly when running inside jsdomjest.config.jsto transform packages that explicitly use ESMp-defer) explicitly enforce ESM thru{ "type": "module" }in theirpackage.json--silentoption to suppress console log when runningnpm test.babelrc.jstobabel.config.jsonfor modernizationwebpack@5webpack-visualizer-plugintowebpack-stats-pluginprocess.env.VERSIONis never used in production code, removing it fromDefinePluginTested environment
npm testdirectline.js(bundle)npm linkto Web ChatIntegration tests consists of:
For other browsers, we rely on Web Chat to test them.
Additional context
Jest doesn't like ESM
When running Jest with ESM-enforcing packages, such as
p-defer, default Jest configuration will fail because it tries to import as ESM while running as CommonJS.In addition to userland code, we also need to transpile
/node_modules/p-deferwhile Jest is running Babel on-the-fly. Thus,transformIgnorePatternsis updated to includep-defer, which is used in test code.Transpiling on-the-fly
Both
botframework-streamingandbufferpackage requires us to usebabel-loaderwhile bundling thru Webpack:botframework-streamingpackage.json/browserpoint to a monolithic bundle)uuidand is not ES5-friendly, due to the use of default argumentbuffer