Skip to content

Commit

Permalink
fix: improve bundle loading stability, fix type exports
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg committed Feb 17, 2023
1 parent 8482392 commit 41a9508
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 50 deletions.
8 changes: 0 additions & 8 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
],
"npmClient": "npm",
"version": "0.8.20",
"command": {
"version": {
"conventionalCommits": true,
"createRelease": "github",
"syncWorkspaceLock": true,
"message": "chore(release): publish new version %v"
}
},
"ignoreChanges": [
"**/__fixtures__/**",
"**/__tests__/**",
Expand Down
4 changes: 2 additions & 2 deletions packages/@pandino/bundle-installer-dom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class PandinoBundleInstallerDomActivator implements BundleActivat
this.context = context;
this.fetcherReference = context.getServiceReference<ManifestFetcher>(FRAMEWORK_MANIFEST_FETCHER);
this.fetcher = context.getService<ManifestFetcher>(this.fetcherReference);
await this.registerDocumentDefinedManifests();
this.registerDocumentDefinedManifests();
}

async stop(context: BundleContext): Promise<void> {
Expand Down Expand Up @@ -64,7 +64,7 @@ export default class PandinoBundleInstallerDomActivator implements BundleActivat
this.installedManifestList = [...locations];
};

await callback();
callback();

this.observer = new MutationObserver(callback);
this.observer.observe(documentDefinedManifest.childNodes[0], config);
Expand Down
11 changes: 4 additions & 7 deletions packages/@pandino/configuration-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "./dist/cjs/configuration-management.cjs",
"module": "./dist/esm/configuration-management.mjs",
"types": "dist/esm/index.d.ts",
"types": "dist/esm/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -66,13 +66,10 @@
"lines": 95
}
},
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
},
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": ["ts-jest", {
"tsconfig": "tsconfig.test.json"
}]
},
"moduleFileExtensions": [
"ts",
Expand Down
11 changes: 4 additions & 7 deletions packages/@pandino/event-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Reference implementation of the Pandino Event Admin API",
"main": "./dist/cjs/event-admin.cjs",
"module": "./dist/esm/event-admin.mjs",
"types": "dist/esm/index.d.ts",
"types": "dist/esm/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -66,13 +66,10 @@
"lines": 90
}
},
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
},
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": ["ts-jest", {
"tsconfig": "tsconfig.test.json"
}]
},
"moduleFileExtensions": [
"ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/@pandino/loader-configuration-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.8.20",
"description": "Bundle loading configuration for the DOM",
"module": "./dist/loader-configuration-dom.mjs",
"types": "dist/esm/index.d.ts",
"types": "dist/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@pandino/loader-configuration-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Bundle loading configuration for NodeJS",
"main": "./dist/cjs/loader-configuration-nodejs.cjs",
"module": "./dist/esm/loader-configuration-nodejs.mjs",
"types": "dist/esm/index.d.ts",
"types": "dist/esm/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down
11 changes: 4 additions & 7 deletions packages/@pandino/pandino/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "The reference implementation of the Pandino API specification",
"main": "./dist/cjs/pandino.cjs",
"module": "./dist/esm/pandino.mjs",
"types": "dist/esm/index.d.ts",
"types": "dist/esm/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -65,13 +65,10 @@
"lines": 80
}
},
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
},
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": ["ts-jest", {
"tsconfig": "tsconfig.test.json"
}]
},
"moduleFileExtensions": [
"ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Pandino } from '../../pandino';
import { CapabilitySet } from './capability-set/capability-set';
import { BundleRevisionImpl } from './bundle-revision-impl';
import { BundleRequirementImpl } from './wiring/bundle-requirement-impl';
import { isAnyMissing } from '../utils/helpers';
import { BundleWireImpl } from './wiring/bundle-wire-impl';
import { BundleWiringImpl } from './bundle-wiring-impl';
import { BundleImpl } from './bundle-impl';
Expand Down Expand Up @@ -101,7 +100,7 @@ export class StatefulResolver {
}

private static canBundleBeResolved(rev: BundleRevision, wires: Array<BundleWire>): boolean {
const validStates: BundleState[] = ['INSTALLED', 'STARTING'];
const validStates: BundleState[] = ['INSTALLED', 'STARTING', 'ACTIVE'];
if (!validStates.includes(rev.getBundle().getState())) {
return false;
}
Expand Down
11 changes: 4 additions & 7 deletions packages/@pandino/persistence-manager-localstorage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.8.20",
"description": "Localstorage implementation of the Pandino Persistence Manager API",
"module": "./dist/esm/persistence-manager-localstorage.mjs",
"types": "dist/esm/index.d.ts",
"types": "dist/esm/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -64,13 +64,10 @@
"lines": 85
}
},
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
},
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": ["ts-jest", {
"tsconfig": "tsconfig.test.json"
}]
},
"moduleFileExtensions": [
"ts",
Expand Down
11 changes: 4 additions & 7 deletions packages/@pandino/persistence-manager-memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "In Memory implementation of the Pandino Persistence Manager API",
"main": "./dist/cjs/persistence-manager-memory.cjs",
"module": "./dist/esm/persistence-manager-memory.mjs",
"types": "dist/esm/index.d.ts",
"types": "dist/esm/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down Expand Up @@ -67,13 +67,10 @@
"lines": 95
}
},
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
},
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": ["ts-jest", {
"tsconfig": "tsconfig.test.json"
}]
},
"moduleFileExtensions": [
"ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/@pandino/umd-activator-resolver-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.8.20",
"description": "Activator Resolver supporting UMD modules for browsers",
"module": "./dist/umd-activator-resolver-dom.mjs",
"types": "dist/index.d.ts",
"types": "dist/dist/index.d.ts",
"type": "module",
"exports": {
".": {
Expand Down

0 comments on commit 41a9508

Please sign in to comment.