Skip to content

Commit

Permalink
Release v3.25.5
Browse files Browse the repository at this point in the history
Co-authored-by: o.drapeza <[email protected]>
GitOrigin-RevId: f2b8efe45c3c1b39f0afa200458b8fc0d3dbba22
  • Loading branch information
tramvaijsorg and o.drapeza committed Jan 12, 2024
1 parent 6c67aad commit 7db4956
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages-versions.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

{"@tramvai/cli":"3.25.3","@tramvai/swc-integration":"3.25.3","@tinkoff/browser-timings":"0.11.1","@tinkoff/browserslist-config":"0.3.2","@tinkoff/browser-cookies":"3.0.1","@tinkoff/dippy":"0.9.2","@tinkoff/env-validators":"0.2.1","@tinkoff/error-handlers":"0.6.1","@tinkoff/errors":"0.4.2","@tinkoff/eslint-plugin-tramvai":"0.7.3","@tinkoff/hook-runner":"0.5.1","@tramvai/http-client":"0.3.1","@tinkoff/is-modern-lib":"3.0.2","@tramvai/react-lazy-hydration-render":"0.3.1","@tinkoff/logger":"0.10.170","@tinkoff/pack-polyfills":"0.5.1","@tinkoff/measure-express-requests":"3.0.1","@tinkoff/measure-fastify-requests":"0.2.1","@tinkoff/meta-tags-generate":"0.6.1","@tinkoff/metrics-noop":"3.0.1","@tinkoff/minicss-class-generator":"0.3.1","@tinkoff/mocker":"3.0.1","@tinkoff/module-loader-client":"0.5.1","@tinkoff/module-loader-server":"0.6.1","@tinkoff/monkeypatch":"3.0.1","@tinkoff/package-manager-wrapper":"0.2.2","@tinkoff/htmlpagebuilder":"0.6.1","prettier-config-tinkoff":"0.3.1","@tinkoff/pubsub":"0.6.1","@tinkoff/react-hooks":"0.2.1","@tinkoff/router":"0.3.39","@tramvai/safe-strings":"0.6.2","@tinkoff/terminus":"0.2.1","@tinkoff/layout-factory":"0.4.1","@tramvai/tinkoff-request-http-client-adapter":"0.10.59","@tinkoff/url":"0.9.2","@tinkoff/user-agent":"0.5.59","@tinkoff/webpack-dedupe-plugin":"2.0.2","@tramvai/module-autoscroll":"3.25.3","@tramvai/module-cache-warmup":"3.25.3","@tramvai/module-child-app":"3.25.3","@tramvai/module-client-hints":"3.25.3","@tramvai/module-common":"3.25.3","@tramvai/module-cookie":"3.25.3","@tramvai/module-deps-graph":"3.25.3","@tramvai/module-dns-cache":"3.25.3","@tramvai/module-environment":"3.25.3","@tramvai/module-error-interceptor":"3.25.3","@tramvai/module-http-client":"3.25.3","@tramvai/module-http-proxy-agent":"3.25.3","@tramvai/module-log":"3.25.3","@tramvai/module-metrics":"3.25.3","@tramvai/module-micro-sentry":"3.25.3","@tramvai/module-mocker":"3.25.3","@tramvai/module-page-render-mode":"3.25.3","@tramvai/module-progressive-web-app":"3.25.3","@tramvai/module-react-query":"3.25.3","@tramvai/module-render":"3.25.3","@tramvai/module-request-limiter":"3.25.3","@tramvai/module-router":"3.25.3","@tramvai/module-sentry":"3.25.3","@tramvai/module-seo":"3.25.3","@tramvai/module-server":"3.25.3","@tramvai/tokens-child-app":"3.25.3","@tramvai/tokens-common":"3.25.3","@tramvai/tokens-cookie":"3.25.3","@tramvai/tokens-core":"3.25.3","@tramvai/tokens-core-private":"3.25.3","@tramvai/tokens-http-client":"3.25.3","@tramvai/tokens-metrics":"3.25.3","@tramvai/tokens-react-query":"3.25.3","@tramvai/tokens-render":"3.25.3","@tramvai/tokens-router":"3.25.3","@tramvai/tokens-server":"3.25.3","@tramvai/tokens-server-private":"3.25.3","@tramvai/child-app-core":"3.25.3","@tramvai/core":"3.25.3","@tramvai/experiments":"3.25.3","@tramvai/papi":"3.25.3","@tramvai/pwa-recipes":"3.25.3","@tramvai/react":"3.25.3","@tramvai/react-query":"3.25.3","@tramvai/state":"3.25.3","@tramvai/storybook-addon":"3.25.3","@tramvai/types-actions-state-context":"3.25.3","@tramvai/test-child-app":"3.25.3","@tramvai/test-helpers":"3.25.3","@tramvai/test-integration":"3.25.3","@tramvai/test-integration-jest":"3.25.3","@tramvai/test-jsdom":"3.25.3","@tramvai/test-mocks":"3.25.3","@tramvai/test-pw":"3.25.3","@tramvai/test-puppeteer":"3.25.3","@tramvai/test-react":"3.25.3","@tramvai/test-unit":"3.25.3","@tramvai/test-unit-jest":"3.25.3","@tramvai/build":"4.1.0","@tramvai/tools-check-versions":"0.5.3","@tramvai/create":"3.25.3","@tramvai/tools-generate-schema":"0.2.1","@tramvai/tools-migrate":"0.7.3","@tinkoff-monorepo/depscheck":"3.0.2","@tinkoff-monorepo/fix-ts-references":"3.0.2","@tinkoff-monorepo/pkgs-collector":"3.0.2","@tinkoff-monorepo/pkgs-collector-dir":"3.0.2","@tinkoff-monorepo/pkgs-collector-workspaces":"3.0.2"}
{"@tramvai/cli":"3.25.5","@tramvai/swc-integration":"3.25.5","@tinkoff/browser-timings":"0.11.1","@tinkoff/browserslist-config":"0.3.2","@tinkoff/browser-cookies":"3.0.1","@tinkoff/dippy":"0.9.2","@tinkoff/env-validators":"0.2.1","@tinkoff/error-handlers":"0.6.1","@tinkoff/errors":"0.4.2","@tinkoff/eslint-plugin-tramvai":"0.7.3","@tinkoff/hook-runner":"0.5.1","@tramvai/http-client":"0.3.1","@tinkoff/is-modern-lib":"3.0.2","@tramvai/react-lazy-hydration-render":"0.3.1","@tinkoff/logger":"0.10.170","@tinkoff/pack-polyfills":"0.5.1","@tinkoff/measure-express-requests":"3.0.1","@tinkoff/measure-fastify-requests":"0.2.1","@tinkoff/meta-tags-generate":"0.6.1","@tinkoff/metrics-noop":"3.0.1","@tinkoff/minicss-class-generator":"0.3.1","@tinkoff/mocker":"3.0.1","@tinkoff/module-loader-client":"0.5.1","@tinkoff/module-loader-server":"0.6.1","@tinkoff/monkeypatch":"3.0.1","@tinkoff/package-manager-wrapper":"0.2.2","@tinkoff/htmlpagebuilder":"0.6.1","prettier-config-tinkoff":"0.3.1","@tinkoff/pubsub":"0.6.1","@tinkoff/react-hooks":"0.2.1","@tinkoff/router":"0.3.41","@tramvai/safe-strings":"0.6.2","@tinkoff/terminus":"0.2.1","@tinkoff/layout-factory":"0.4.1","@tramvai/tinkoff-request-http-client-adapter":"0.10.61","@tinkoff/url":"0.9.2","@tinkoff/user-agent":"0.5.61","@tinkoff/webpack-dedupe-plugin":"2.0.2","@tramvai/module-autoscroll":"3.25.5","@tramvai/module-cache-warmup":"3.25.5","@tramvai/module-child-app":"3.25.5","@tramvai/module-client-hints":"3.25.5","@tramvai/module-common":"3.25.5","@tramvai/module-cookie":"3.25.5","@tramvai/module-deps-graph":"3.25.5","@tramvai/module-dns-cache":"3.25.5","@tramvai/module-environment":"3.25.5","@tramvai/module-error-interceptor":"3.25.5","@tramvai/module-http-client":"3.25.5","@tramvai/module-http-proxy-agent":"3.25.5","@tramvai/module-log":"3.25.5","@tramvai/module-metrics":"3.25.5","@tramvai/module-micro-sentry":"3.25.5","@tramvai/module-mocker":"3.25.5","@tramvai/module-page-render-mode":"3.25.5","@tramvai/module-progressive-web-app":"3.25.5","@tramvai/module-react-query":"3.25.5","@tramvai/module-render":"3.25.5","@tramvai/module-request-limiter":"3.25.5","@tramvai/module-router":"3.25.5","@tramvai/module-sentry":"3.25.5","@tramvai/module-seo":"3.25.5","@tramvai/module-server":"3.25.5","@tramvai/tokens-child-app":"3.25.5","@tramvai/tokens-common":"3.25.5","@tramvai/tokens-cookie":"3.25.5","@tramvai/tokens-core":"3.25.5","@tramvai/tokens-core-private":"3.25.5","@tramvai/tokens-http-client":"3.25.5","@tramvai/tokens-metrics":"3.25.5","@tramvai/tokens-react-query":"3.25.5","@tramvai/tokens-render":"3.25.5","@tramvai/tokens-router":"3.25.5","@tramvai/tokens-server":"3.25.5","@tramvai/tokens-server-private":"3.25.5","@tramvai/child-app-core":"3.25.5","@tramvai/core":"3.25.5","@tramvai/experiments":"3.25.5","@tramvai/papi":"3.25.5","@tramvai/pwa-recipes":"3.25.5","@tramvai/react":"3.25.5","@tramvai/react-query":"3.25.5","@tramvai/state":"3.25.5","@tramvai/storybook-addon":"3.25.5","@tramvai/types-actions-state-context":"3.25.5","@tramvai/test-child-app":"3.25.5","@tramvai/test-helpers":"3.25.5","@tramvai/test-integration":"3.25.5","@tramvai/test-integration-jest":"3.25.5","@tramvai/test-jsdom":"3.25.5","@tramvai/test-mocks":"3.25.5","@tramvai/test-pw":"3.25.5","@tramvai/test-puppeteer":"3.25.5","@tramvai/test-react":"3.25.5","@tramvai/test-unit":"3.25.5","@tramvai/test-unit-jest":"3.25.5","@tramvai/build":"4.1.0","@tramvai/tools-check-versions":"0.5.3","@tramvai/create":"3.25.5","@tramvai/tools-generate-schema":"0.2.1","@tramvai/tools-migrate":"0.7.3","@tinkoff-monorepo/depscheck":"3.0.2","@tinkoff-monorepo/fix-ts-references":"3.0.2","@tinkoff-monorepo/pkgs-collector":"3.0.2","@tinkoff-monorepo/pkgs-collector-dir":"3.0.2","@tinkoff-monorepo/pkgs-collector-workspaces":"3.0.2"}
10 changes: 1 addition & 9 deletions packages/cli/src/library/webpack/application/client/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ import {
WEBPACK_DEBUG_STATS_FIELDS,
} from '../../constants/stats';
import { pwaBlock } from '../../blocks/pwa/client';
import type { ModuleFederationFixRangeOptions } from '../../plugins/ModuleFederationFixRange';
import { ModuleFederationFixRange } from '../../plugins/ModuleFederationFixRange';

export default (configManager: ConfigManager<ApplicationConfigEntry>) => (config: Config) => {
const { polyfill, fileSystemPages, shared, env } = configManager;
const { polyfill, fileSystemPages, env } = configManager;

const portal = path.resolve(configManager.rootDir, `packages/${process.env.APP_ID}/portal.js`);
const polyfillPath = path.resolve(configManager.rootDir, polyfill ?? 'src/polyfill');
Expand Down Expand Up @@ -61,12 +59,6 @@ export default (configManager: ConfigManager<ApplicationConfigEntry>) => (config
.when(portalExists, (cfg) => cfg.entry('portal').add(portal))
.when(polyfillExists, (cfg) => cfg.entry('polyfill').add(polyfillPath));

config.plugin('module-federation-validate-duplicates').use(ModuleFederationFixRange, [
{
flexibleTramvaiVersions: shared.flexibleTramvaiVersions,
} as ModuleFederationFixRangeOptions,
]);

config
.plugin('stats-plugin')
.use(StatsWriterPlugin, [
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/src/library/webpack/application/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import type { ApplicationConfigEntry } from '../../../typings/configEntry/applic
import type { ModuleFederationIgnoreEntriesOptions } from '../plugins/ModuleFederationIgnoreEntries';
import { ModuleFederationIgnoreEntries } from '../plugins/ModuleFederationIgnoreEntries';
import { rootErrorBoundaryFactory } from '../blocks/rootErrorBoundary';
import type { ModuleFederationFixRangeOptions } from '../plugins/ModuleFederationFixRange';
import { ModuleFederationFixRange } from '../plugins/ModuleFederationFixRange';

export const commonApplication =
(configManager: ConfigManager<ApplicationConfigEntry>) => (config: Config) => {
Expand All @@ -23,5 +25,11 @@ export const commonApplication =
{ entries: ['polyfill'] } as ModuleFederationIgnoreEntriesOptions,
]);

config.plugin('module-federation-validate-duplicates').use(ModuleFederationFixRange, [
{
flexibleTramvaiVersions: configManager.shared.flexibleTramvaiVersions,
} as ModuleFederationFixRangeOptions,
]);

config.batch(rootErrorBoundaryFactory(configManager));
};
10 changes: 1 addition & 9 deletions packages/cli/src/library/webpack/child-app/client/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import files from '../../blocks/filesClient';
import nodeClient from '../../blocks/nodeClient';
import postcssAssets from '../../blocks/postcssAssets';
import type { ChildAppConfigEntry } from '../../../../typings/configEntry/child-app';
import type { ModuleFederationFixRangeOptions } from '../../plugins/ModuleFederationFixRange';
import { ModuleFederationFixRange } from '../../plugins/ModuleFederationFixRange';

export default (configManager: ConfigManager<ChildAppConfigEntry>) => (config: Config) => {
const { name, version, shared } = configManager;
const { name, version } = configManager;
config.name('client');

config.batch(common(configManager));
Expand All @@ -35,11 +33,5 @@ export default (configManager: ConfigManager<ChildAppConfigEntry>) => (config: C
},
]);

config.plugin('module-federation-validate-duplicates').use(ModuleFederationFixRange, [
{
flexibleTramvaiVersions: shared.flexibleTramvaiVersions,
} as ModuleFederationFixRangeOptions,
]);

config.batch(files(configManager)).batch(nodeClient(configManager));
};
10 changes: 9 additions & 1 deletion packages/cli/src/library/webpack/child-app/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ import { configToEnv } from '../blocks/configToEnv';
import sourcemaps from '../blocks/sourcemaps';
import type { ChildAppConfigEntry } from '../../../typings/configEntry/child-app';
import { extractCssPluginFactory } from '../blocks/extractCssPlugin';
import type { ModuleFederationFixRangeOptions } from '../plugins/ModuleFederationFixRange';
import { ModuleFederationFixRange } from '../plugins/ModuleFederationFixRange';

export default (configManager: ConfigManager<ChildAppConfigEntry>) => (config: Config) => {
const { name, root, sourceMap, buildType } = configManager;
const { name, root, sourceMap, buildType, shared } = configManager;

const cssLocalIdentName =
configManager.env === 'production'
Expand Down Expand Up @@ -101,4 +103,10 @@ export default (configManager: ConfigManager<ChildAppConfigEntry>) => (config: C
shared: getSharedModules(configManager),
} as UniversalFederationPluginOptions,
]);

config.plugin('module-federation-validate-duplicates').use(ModuleFederationFixRange, [
{
flexibleTramvaiVersions: shared.flexibleTramvaiVersions,
} as ModuleFederationFixRangeOptions,
]);
};
13 changes: 4 additions & 9 deletions packages/tramvai/state/src/stores/SimpleEmitter.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
type Listener = (...args: Array<any>) => void;
export class SimpleEmitter {
listeners: Listener[] = [];
listeners: Set<Listener> = new Set();

emit(name?: string) {
this.listeners.forEach((listener) => {
listener();
});
}

addListener(event: string, fn: Listener) {
this.listeners.push(fn);
this.listeners.add(fn);
}

on(event: string, fn: Listener) {
this.addListener(event, fn);
}

removeListener(event: string, fn: Listener) {
const listeners = [];
for (let i = 0; i < this.listeners.length; i++) {
if (this.listeners[i] !== fn) {
listeners.push(this.listeners[i]);
}
}
this.listeners = listeners;
this.listeners.delete(fn);
}

off(event: string, fn: Listener) {
Expand Down

0 comments on commit 7db4956

Please sign in to comment.