Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@embroider/shared-internals

Package Overview
Dependencies
Maintainers
9
Versions
403
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@embroider/shared-internals - npm Package Compare versions

Comparing version 2.6.3-unstable.b059849 to 2.6.3-unstable.bd04b35

3

package.json
{
"name": "@embroider/shared-internals",
"version": "2.6.3-unstable.b059849",
"version": "2.6.3-unstable.bd04b35",
"private": false,

@@ -37,2 +37,3 @@ "description": "Utilities shared among the other embroider packages",

"minimatch": "^3.0.4",
"resolve.exports": "^2.0.2",
"semver": "^7.3.5"

@@ -39,0 +40,0 @@ },

import type PackageCache from './package-cache';
export declare function syntheticJStoHBS(source: string): string | null;
export declare function needsSyntheticComponentJS(requestedSpecifier: string, foundFile: string, packageCache: Pick<PackageCache, 'ownerOfFile'>): string | null;
export declare function isInComponents(id: string, packageCache: Pick<PackageCache, 'ownerOfFile'>): boolean;
export declare function templateOnlyComponentSource(): string;

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

exports.needsSyntheticComponentJS = needsSyntheticComponentJS;
exports.isInComponents = isInComponents;
exports.templateOnlyComponentSource = templateOnlyComponentSource;

@@ -10,2 +11,3 @@ const fs_extra_1 = require("fs-extra");

const path_1 = require("path");
const resolve_exports_1 = require("resolve.exports");
function syntheticJStoHBS(source) {

@@ -38,4 +40,13 @@ // explicit js is the only case we care about here. Synthetic template JS is

function isInComponents(id, packageCache) {
var _a;
const pkg = packageCache.ownerOfFile(id);
return (pkg === null || pkg === void 0 ? void 0 : pkg.isV2App()) && id.slice(pkg === null || pkg === void 0 ? void 0 : pkg.root.length).split(path_1.sep).join('/').startsWith('/components');
if (!(pkg === null || pkg === void 0 ? void 0 : pkg.isV2App())) {
return false;
}
let tryResolve = (0, resolve_exports_1.resolve)(pkg.packageJSON, './components', {
browser: true,
conditions: ['default', 'imports'],
});
let componentsDir = (_a = tryResolve === null || tryResolve === void 0 ? void 0 : tryResolve[0]) !== null && _a !== void 0 ? _a : './components';
return ('.' + id.slice(pkg === null || pkg === void 0 ? void 0 : pkg.root.length).split(path_1.sep).join('/')).startsWith(componentsDir);
}

@@ -42,0 +53,0 @@ function templateOnlyComponentSource() {

Sorry, the diff of this file is not supported yet

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