New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lwrjs/app-service

Package Overview
Dependencies
Maintainers
7
Versions
490
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwrjs/app-service - npm Package Compare versions

Comparing version 0.0.2-alpha18 to 0.0.2-alpha19

2

cjs/moduleProvider/index.js

@@ -56,3 +56,3 @@ "use strict";

const rootModules = metadata.customElements.map(shared_utils_1.kebabcaseToCamelcase);
if (!rootModules.includes(this.appContext.root)) {
if (requestPath === '/' && !rootModules.includes(this.appContext.root)) {
// If the root application module is not included in the root module array, add it

@@ -59,0 +59,0 @@ // This happens when the 'lwr-root' HTML property is used for root insertion (see init.ts)

@@ -33,2 +33,3 @@ "use strict";

const servicesSource = isAMD && loaderServices && createLoaderServicesSource(loaderServices);
const versionedRootCmps = isAMD && (await Promise.all(rootComponents.map((s) => shared_utils_1.getVersionedSpecifier(s, moduleRegistry))));
const importRootModules = rootComponents.map((wc, index) => `import Ctor${index} from '${wc}'`);

@@ -39,8 +40,9 @@ return [

syntheticShadow && `import '@lwc/synthetic-shadow';`,
//services
// loader services/hooks (AMD format only)
isAMD &&
`import { load ${loaderServices && loaderServices.length ? ', services' : ''}} from 'lwr/loader';`,
// import dependencies
servicesSource,
// import dependencies statically (ESM format only)
isESM && importRootModules.join('\n'),
// hmr
// HMR (ESM format only)mr
isESM && `import { initHMR } from 'lwr/hmr';`,

@@ -50,9 +52,9 @@ isESM && `import { initESM } from 'lwr/moduleInvalidationInitESM';`,

`import { init } from '${initModule}';`,
// serviceSources
servicesSource,
// initialize
// initialize root components
isESM
? `init([${rootComponents.map((r, i) => `["${r}", Ctor${i}]`)}]); initHMR(); initESM();`
: // TODO: This only initializes the first of the root components
`const rootCmp = globalThis.LWR.rootComponent || '${await shared_utils_1.getVersionedSpecifier(rootComponents[0], moduleRegistry)}';\nload(rootCmp).then(({ default: Ctor }) => { init([[rootCmp, Ctor]]); });`,
: `const rootCmps = ${JSON.stringify(versionedRootCmps)};
const appRoot = globalThis.LWR.rootComponent;
appRoot && !rootCmps.includes(appRoot) && rootCmps.push(appRoot);
rootCmps.forEach(c => load(c).then(({ default: Ctor }) => { init([[c, Ctor]]); }));`,
]

@@ -59,0 +61,0 @@ .filter(Boolean)

@@ -7,3 +7,3 @@ {

},
"version": "0.0.2-alpha18",
"version": "0.0.2-alpha19",
"homepage": "https://lwr.dev/",

@@ -27,5 +27,5 @@ "repository": {

"dependencies": {
"@lwrjs/shared-utils": "0.0.2-alpha18"
"@lwrjs/shared-utils": "0.0.2-alpha19"
},
"gitHead": "9cf922f2e624d3255ab89d39a019be4e88793c61"
"gitHead": "96059521952c09f1a411f0aea3fed204a9bd5303"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc