diff --git a/package.json b/package.json index ce9c4c0e..876111f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wisemapping-front-end", - "version": "0.4.0", + "version": "0.0.0", "private": true, "homepage": "http://localhost:8080/react", "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL", @@ -15,7 +15,6 @@ "packages/*" ], "scripts": { - "bootstrap": "lerna run bootstrap", "build": "lerna run build", "clean": "lerna clean && rm -rf node_modules", "lint": "lerna run lint --stream", diff --git a/packages/editor/package.json b/packages/editor/package.json index b2d59732..3db38622 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -5,8 +5,10 @@ "license": "MIT", "author": "Paulo Veiga , Ezequiel Bergamaschi ", "main": "dist/editor.bundle.js", + "files": [ + "dist" + ], "scripts": { - "bootstrap": "yalc publish;yalc add @wisemapping/mindplot", "build": "webpack --config webpack.prod.js", "cy:open": "cypress open", "cy:run": "cypress run", @@ -33,6 +35,7 @@ "cypress-image-snapshot": "^4.0.1", "jest-transform-stub": "^2.0.0", "react": "^18.2.0", + "react-dom": "^18.2.0", "start-server-and-test": "^2.0.0" }, "peerDependencies": { diff --git a/packages/mindplot/package.json b/packages/mindplot/package.json index 9e0190b1..915243d0 100644 --- a/packages/mindplot/package.json +++ b/packages/mindplot/package.json @@ -15,7 +15,8 @@ "files": [ "src", "assets", - "dist" + "dist", + "libraries" ], "scripts": { "build": "webpack --config webpack.prod.js", diff --git a/packages/mindplot/webpack.prod.js b/packages/mindplot/webpack.prod.js index 401525a3..41e513cc 100644 --- a/packages/mindplot/webpack.prod.js +++ b/packages/mindplot/webpack.prod.js @@ -1,11 +1,13 @@ const { merge } = require('webpack-merge'); const common = require('./webpack.common'); +const pkg = require('./package.json'); const prodConfig = { optimization: { usedExports: true, minimize: true, }, + externals: [...Object.keys(pkg.dependencies)], }; module.exports = merge(common, prodConfig); diff --git a/packages/web2d/package.json b/packages/web2d/package.json index 246df59d..e7d42ede 100644 --- a/packages/web2d/package.json +++ b/packages/web2d/package.json @@ -23,10 +23,6 @@ "test": "yarn test:integration", "test:integration": "start-server-and-test storybook http-get://localhost:6006 cy:run" }, - "dependencies": { - "@wisemapping/core-js": "^0.6.0", - "jquery": "^3.6.0" - }, "devDependencies": { "@mdx-js/react": "^1.6.22", "@storybook/addon-actions": "^6.5.15", @@ -43,7 +39,7 @@ "start-server-and-test": "^1.15.2" }, "peerDependencies": { - "@wisemapping/core-js": "*", + "@wisemapping/core-js": "^0.6.0", "jquery": "^3.6.0" }, "publishConfig": { diff --git a/packages/web2d/webpack.prod.js b/packages/web2d/webpack.prod.js index 32c619f0..96ef162d 100644 --- a/packages/web2d/webpack.prod.js +++ b/packages/web2d/webpack.prod.js @@ -1,10 +1,12 @@ const { merge } = require('webpack-merge'); const common = require('./webpack.common'); +const pkg = require('./package.json'); /** @type {import('webpack').Configuration} */ const prodConfig = { mode: 'production', devtool: 'source-map', + externals: [...Object.keys(pkg.peerDependencies)], }; module.exports = merge(common, prodConfig); diff --git a/yarn.lock b/yarn.lock index 5b84eebd..e3ad9c2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5934,20 +5934,20 @@ __metadata: languageName: node linkType: hard -"@wisemapping/core-js@*, @wisemapping/core-js@workspace:packages/core-js": +"@wisemapping/core-js@^0.6.0, @wisemapping/core-js@workspace:packages/core-js": version: 0.0.0-use.local resolution: "@wisemapping/core-js@workspace:packages/core-js" languageName: unknown linkType: soft -"@wisemapping/editor@*, @wisemapping/editor@workspace:packages/editor": +"@wisemapping/editor@^0.6.0, @wisemapping/editor@workspace:packages/editor": version: 0.0.0-use.local resolution: "@wisemapping/editor@workspace:packages/editor" dependencies: "@formatjs/cli": ^6.0.4 "@testing-library/react": ^13.4.0 "@types/cypress-image-snapshot": ^3.1.6 - "@wisemapping/mindplot": "*" + "@wisemapping/mindplot": ^5.1.0 babel-polyfill: ^6.26.0 cypress: ^12.3.0 cypress-image-snapshot: ^4.0.1 @@ -5955,6 +5955,7 @@ __metadata: jest-transform-stub: ^2.0.0 react: ^18.2.0 react-color: ^2.19.3 + react-dom: ^18.2.0 react-loader-spinner: ^5.3.4 start-server-and-test: ^2.0.0 peerDependencies: @@ -5969,7 +5970,7 @@ __metadata: languageName: unknown linkType: soft -"@wisemapping/mindplot@*, @wisemapping/mindplot@workspace:packages/mindplot": +"@wisemapping/mindplot@^5.1.0, @wisemapping/mindplot@workspace:packages/mindplot": version: 0.0.0-use.local resolution: "@wisemapping/mindplot@workspace:packages/mindplot" dependencies: @@ -5985,8 +5986,8 @@ __metadata: "@storybook/manager-webpack4": ^6.5.16 "@storybook/testing-library": ^0.0.13 "@types/jquery": ^3.5.11 - "@wisemapping/core-js": "*" - "@wisemapping/web2d": "*" + "@wisemapping/core-js": ^0.6.0 + "@wisemapping/web2d": ^0.6.0 babel-loader: ^8.3.0 blob-polyfill: ^6.0.20211015 cypress: ^12.3.0 @@ -6001,7 +6002,7 @@ __metadata: languageName: unknown linkType: soft -"@wisemapping/web2d@*, @wisemapping/web2d@workspace:packages/web2d": +"@wisemapping/web2d@^0.6.0, @wisemapping/web2d@workspace:packages/web2d": version: 0.0.0-use.local resolution: "@wisemapping/web2d@workspace:packages/web2d" dependencies: @@ -6015,13 +6016,11 @@ __metadata: "@storybook/html": ^6.5.15 "@storybook/manager-webpack5": ^6.5.15 "@storybook/testing-library": ^0.0.13 - "@wisemapping/core-js": "*" cypress: 12.3.0 cypress-image-snapshot: ^4.0.1 - jquery: ^3.6.0 start-server-and-test: ^1.15.2 peerDependencies: - "@wisemapping/core-js": "*" + "@wisemapping/core-js": ^0.6.0 jquery: ^3.6.0 languageName: unknown linkType: soft @@ -6040,7 +6039,7 @@ __metadata: "@testing-library/cypress": ^8.0.3 "@types/testing-library__cypress": ^5.0.8 "@welldone-software/why-did-you-render": ^7.0.1 - "@wisemapping/editor": "*" + "@wisemapping/editor": ^0.6.0 axios: ^0.27.2 cypress: ^12.3.0 cypress-image-snapshot: ^4.0.1 @@ -14407,13 +14406,6 @@ __metadata: languageName: node linkType: hard -"jquery@npm:^3.6.0": - version: 3.6.3 - resolution: "jquery@npm:3.6.3" - checksum: 0fd366bdcaa0c84a7a8751ce20f8192290141913978b5059574426d9b01f4365daa675f95aab3eec94fd794d27b08d32078a2236bef404b8ba78073009988ce6 - languageName: node - linkType: hard - "js-sdsl@npm:^4.1.4": version: 4.3.0 resolution: "js-sdsl@npm:4.3.0"