Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
],
"packageManager": "yarn@4.5.1",
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.29.0",
"@babel/preset-typescript": "7.25.9",
"@playwright/test": "^1.51.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.1",
"@testing-library/react-hooks": "^8.0.1",
"@types/babel__plugin-transform-runtime": "^7.9.5",
"@webex/cli-tools": "0.0.0-next.2",
"@webex/package-tools": "0.0.0-next.6",
"babel-jest": "^29.7.0",
Expand Down Expand Up @@ -70,4 +72,4 @@
"prepare": "husky",
"package-tools": "webex-package-tools"
}
}
}
8 changes: 7 additions & 1 deletion packages/@webex/widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"engines": {
"node": ">=20.13.1"
},
"installConfig": {
"hoistingLimits": "dependencies"
},
"main": "dist/webexWidgets.mjs",
"module": "dist/webexWidgets.mjs",
"scripts": {
Expand Down Expand Up @@ -53,8 +56,11 @@
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/preset-env": "^7.8.4",
"@babel/preset-react": "^7.8.3",
"@babel/register": "^7.25.9",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@momentum-ui/core": "19.16.0",
"@momentum-ui/icons": "8.28.5",
"@momentum-ui/react": "^23.21.4",
"@semantic-release/changelog": "^6.0.0",
"@semantic-release/git": "^10.0.0",
Expand Down Expand Up @@ -117,7 +123,7 @@
"prop-types": "^15.7.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"webex": "2.60.2"
"webex": "2.60.4"
},
"babel": {
"presets": [
Expand Down
4 changes: 2 additions & 2 deletions packages/@webex/widgets/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ module.exports = function(env, argv) {
use: [isDemo ? 'style-loader' : MiniCssExtractPlugin.loader, 'css-loader'],
include: [
resolveMonorepoRoot('node_modules/@momentum-ui'),
resolveMonorepoRoot('node_modules/@webex/components'),
path.resolve(__dirname, 'packages'),
path.resolve(__dirname, 'node_modules/@webex/components'),
path.resolve(__dirname, 'node_modules/@momentum-ui'),
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions widgets-samples/samples-meeting-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"serve": "webpack serve --mode development"
},
"dependencies": {
"@momentum-ui/react": "^23.21.4",
"@webex/widgets": "workspace:*",
"prop-types": "^15.7.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"webex": "2.60.2"
"react-dom": "18.3.1"
Comment on lines 13 to +16

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Re-add Webex as a direct dependency in sample app

Removing webex from this dependency block leaves @webex/widgets' webex peer unsatisfied for samples-meeting-app. That still works in lenient installs, but strict-peer environments (for example CI using strict peer checks) will fail dependency resolution before the sample can build or run. Keeping webex: 2.60.4 explicitly in the sample dependencies avoids those install-time failures and keeps the sample self-contained.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is passing, deps files are there

},
"devDependencies": {
"@babel/core": "^7.25.2",
Expand Down
9 changes: 9 additions & 0 deletions widgets-samples/samples-meeting-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const {CleanWebpackPlugin} = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const {version} = require('./package.json');

const widgetsDir = path.dirname(require.resolve('@webex/widgets/package.json'));

module.exports = function(env, argv) {
return {
cache: true,
Expand All @@ -18,6 +20,13 @@ module.exports = function(env, argv) {
devtool: argv.mode === 'production' ? 'source-map' : 'inline-source-map',
resolve: {
extensions: ['.js', '.jsx'],
alias: {
react: path.dirname(require.resolve('react/package.json', { paths: [widgetsDir] })),
'react-dom': path.dirname(require.resolve('react-dom/package.json', { paths: [widgetsDir] })),
'prop-types': path.dirname(require.resolve('prop-types/package.json', { paths: [widgetsDir] })),
webex: path.dirname(require.resolve('webex/package', { paths: [widgetsDir] })),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve webex alias using package.json path

Update the webex alias target to resolve webex/package.json (or the package root) instead of webex/package. As written, config evaluation can throw MODULE_NOT_FOUND before webpack starts because webex/package is not a standard resolvable subpath, which breaks both build:src and serve for the sample app when this config is loaded.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file has package only

'@webex/common': path.dirname(require.resolve('@webex/common/package.json', { paths: [widgetsDir] })),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve @webex/common via webex path, not widgets root

This alias resolution can fail before webpack starts because @webex/common is a transitive dependency of webex, not a direct dependency of @webex/widgets. With the same Yarn 4 node-modules setup used here and installConfig.hoistingLimits: "dependencies" in packages/@webex/widgets/package.json, transitive packages are nested under the direct dependency (for example under webex/node_modules), so resolving @webex/common from widgetsDir throws MODULE_NOT_FOUND in environments that don’t hoist it to the widgets root.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and it's intentional. The webex package's exports field only exposes three subpaths:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve @webex/common from webex's dependency tree

This alias can crash webpack config loading with MODULE_NOT_FOUND under the hoisting strategy introduced in the same commit: packages/@webex/widgets/package.json now sets installConfig.hoistingLimits to dependencies, which keeps transitive deps (like @webex/common) under their direct dependency (webex) instead of widgetsDir/node_modules. Resolving @webex/common/package.json from widgetsDir therefore becomes unreliable and can fail before compilation starts in Yarn 4 node-modules installs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we hosit, it will again break.

},
fallback: {
"buffer": require.resolve("buffer/"),
"crypto": require.resolve("crypto-browserify"),
Expand Down
Loading
Loading