diff --git a/packages/sui-bundler/CHANGELOG.md b/packages/sui-bundler/CHANGELOG.md index 47f154712..16b3576a6 100644 --- a/packages/sui-bundler/CHANGELOG.md +++ b/packages/sui-bundler/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG +# 9.44.0 (2023-12-01) + + +### Features + +* **packages/sui-bundler:** add server dev config ([593b902](https://github.com/SUI-Components/sui/commit/593b9028706b58070a2614fbcd04d28131a0d890)) + + + # 9.43.0 (2023-10-18) diff --git a/packages/sui-bundler/package.json b/packages/sui-bundler/package.json index 6e1ba74c9..286786c45 100644 --- a/packages/sui-bundler/package.json +++ b/packages/sui-bundler/package.json @@ -1,6 +1,6 @@ { "name": "@s-ui/bundler", - "version": "9.43.0", + "version": "9.44.0", "description": "Config-free bundler for ES6 React apps.", "bin": { "sui-bundler": "./bin/sui-bundler.js" diff --git a/packages/sui-bundler/webpack.config.server.dev.js b/packages/sui-bundler/webpack.config.server.dev.js new file mode 100644 index 000000000..94917cb60 --- /dev/null +++ b/packages/sui-bundler/webpack.config.server.dev.js @@ -0,0 +1,119 @@ +// @ts-check + +const path = require('path') +const webpack = require('webpack') +const HtmlWebpackPlugin = require('html-webpack-plugin') +const {WebpackManifestPlugin} = require('webpack-manifest-plugin') +const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin') +const MiniCssExtractPlugin = require('mini-css-extract-plugin') + +const {envVars, MAIN_ENTRY_POINT, config, cleanList, when} = require('./shared/index.js') +const definePlugin = require('./shared/define.js') +const manifestLoaderRules = require('./shared/module-rules-manifest-loader.js') +const {aliasFromConfig, defaultAlias} = require('./shared/resolve-alias.js') +const {supportLegacyBrowsers} = require('./shared/config.js') + +const {resolveLoader} = require('./shared/resolve-loader.js') +const createBabelRules = require('./shared/module-rules-babel.js') + +const outputPath = path.join(process.cwd(), '.sui/public') + +const {CI = false, PWD = '', CDN} = process.env + +process.env.NODE_ENV = 'development' + +/** @typedef {import('webpack').Configuration} WebpackConfig */ + +const webpackConfig = { + mode: 'development', + context: path.resolve(PWD, 'src'), + resolve: { + alias: { + ...defaultAlias, + ...aliasFromConfig + }, + fallback: { + fs: false, + http: require.resolve('stream-http'), + https: require.resolve('https-browserify'), + buffer: require.resolve('buffer/'), + url: require.resolve('url/'), + stream: false, + zlib: false, + timers: false + }, + modules: ['node_modules', path.resolve(process.cwd())], + extensions: ['.js', '.json'] + }, + stats: 'errors-only', + entry: { + app: [`webpack-hot-middleware/client?path=${CDN}__webpack_hmr`, MAIN_ENTRY_POINT] + }, + target: 'web', + optimization: { + checkWasmTypes: false, + emitOnErrors: false, + removeAvailableModules: false, + removeEmptyChunks: false, + runtimeChunk: true, + splitChunks: false + }, + output: { + path: outputPath, + pathinfo: false, + publicPath: CDN + }, + plugins: [ + new webpack.ProvidePlugin({ + process: 'process/browser.js' + }), + new webpack.EnvironmentPlugin(envVars(config.env)), + definePlugin({__DEV__: true}), + new MiniCssExtractPlugin(), + new HtmlWebpackPlugin({ + template: './index.html', + inject: true, + env: process.env + }), + new WebpackManifestPlugin({fileName: 'asset-manifest.json'}), + new webpack.HotModuleReplacementPlugin(), + new ReactRefreshWebpackPlugin({overlay: false}) + ], + resolveLoader, + module: { + rules: cleanList([ + createBabelRules({supportLegacyBrowsers, isDevelopment: true}), + { + test: /(\.css|\.scss)$/, + use: cleanList([ + MiniCssExtractPlugin.loader, + require.resolve('css-loader'), + when(config['externals-manifest'], () => ({ + loader: 'externals-manifest-loader', + options: { + manifestURL: config['externals-manifest'] + } + })), + { + loader: require.resolve('postcss-loader'), + options: { + postcssOptions: { + plugins: [ + require('autoprefixer')({ + overrideBrowserslist: config.targets + }) + ] + } + } + }, + require.resolve('@s-ui/sass-loader') + ]) + }, + when(config['externals-manifest'], () => manifestLoaderRules(config['externals-manifest'])) + ]) + }, + watch: !CI, + devtool: config.sourcemaps && config.sourcemaps.dev ? config.sourcemaps.dev : false +} + +module.exports = webpackConfig diff --git a/packages/sui-polyfills/CHANGELOG.md b/packages/sui-polyfills/CHANGELOG.md index 2d93f56af..f868934ec 100644 --- a/packages/sui-polyfills/CHANGELOG.md +++ b/packages/sui-polyfills/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG +# 1.20.0 (2023-11-29) + + +### Features + +* **packages/sui-polyfills:** add append polyfill ([255639e](https://github.com/SUI-Components/sui/commit/255639ea48be85b8e7af6417cbb619b5d351f7ff)) + + + # 1.19.0 (2023-11-23) diff --git a/packages/sui-polyfills/package.json b/packages/sui-polyfills/package.json index f048b0d30..3d65fa669 100644 --- a/packages/sui-polyfills/package.json +++ b/packages/sui-polyfills/package.json @@ -1,12 +1,13 @@ { "name": "@s-ui/polyfills", - "version": "1.19.0", + "version": "1.20.0", "description": "Common polyfills for your project", "main": "src/index.js", "scripts": {}, "keywords": [], "dependencies": { - "core-js": "3" + "core-js": "3", + "element-polyfill": "1" }, "license": "MIT", "repository": { diff --git a/packages/sui-polyfills/src/index.js b/packages/sui-polyfills/src/index.js index 8335d733d..5724373b6 100644 --- a/packages/sui-polyfills/src/index.js +++ b/packages/sui-polyfills/src/index.js @@ -31,6 +31,8 @@ require('core-js/features/map/map-keys') require('core-js/features/symbol') +require('element-polyfill/polyfills/element.parent-node.append.js') + require('./element-closest.js') require('./globalThis.js') diff --git a/packages/sui-test-contract/CHANGELOG.md b/packages/sui-test-contract/CHANGELOG.md index 6b68c391a..127707a70 100644 --- a/packages/sui-test-contract/CHANGELOG.md +++ b/packages/sui-test-contract/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG +# 2.13.0 (2023-11-30) + + +### Features + +* **packages/sui-test-contract:** make jobs execution halt on contract publish errors ([d26803b](https://github.com/SUI-Components/sui/commit/d26803b7abac5f86a5b16275f86d940122b40ce3)) + + + # 2.12.0 (2023-03-10) diff --git a/packages/sui-test-contract/bin/sui-test-contract-publish.js b/packages/sui-test-contract/bin/sui-test-contract-publish.js index 4a3d83fcb..b71a271b1 100644 --- a/packages/sui-test-contract/bin/sui-test-contract-publish.js +++ b/packages/sui-test-contract/bin/sui-test-contract-publish.js @@ -37,6 +37,6 @@ new Publisher(options) console.log(`Pact contract for consumer version ${options.consumerVersion} published!`) console.log(`Head over to ${brokerUrl} and login with to see your published contracts.`) }) - .catch(e => { - console.log('Pact contract publishing failed: ', e) + .catch(error => { + throw new Error(`Pact contract publishing failed: ${error}`) }) diff --git a/packages/sui-test-contract/package.json b/packages/sui-test-contract/package.json index 6d8993431..2a263c31c 100644 --- a/packages/sui-test-contract/package.json +++ b/packages/sui-test-contract/package.json @@ -1,6 +1,6 @@ { "name": "@s-ui/test-contract", - "version": "2.12.0", + "version": "2.13.0", "description": "Useful tooling for defining contract tests (based on Pact) that will generate contract documents.", "license": "MIT", "main": "src/index.js",