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.e9544fc to 2.6.3

4

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

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

"tmp": "^0.1.0",
"typescript": "^5.4.5",
"typescript": "^5.1.6",
"@embroider/test-support": "0.36.0"

@@ -55,0 +55,0 @@ },

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

if (owner.name === pkg && (semverRange == null || semver_1.default.satisfies(owner.version, semverRange))) {
if (owner.isEmberAddon()) {
if (owner.isEmberPackage()) {
throw new Error(`You can't use skipBabel to disable transpilation of Ember addons, it only works for non-Ember third-party packages`);

@@ -22,0 +22,0 @@ }

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

let ancestorsDep = ancestor.dependencies.find(d => d.name === dep.name);
if (ancestorsDep !== dep && dep.isEmberAddon()) {
if (ancestorsDep !== dep && dep.isEmberPackage()) {
violations.push({ pkg, dep, ancestors, ancestor, ancestorsDep });

@@ -48,0 +48,0 @@ }

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

exports.emberVirtualPackages.add('ember');
exports.emberVirtualPackages.add('ember-testing');
// this is a real package and even though most of its primary API is implemented

@@ -47,2 +48,7 @@ // as transforms, it does include some runtime code.

exports.emberVirtualPackages.add('@ember/owner');
// Added in ember-source 4.5.0-beta.1
exports.emberVirtualPackages.add('@ember/renderer');
// Not provided by rfc176-data, but is needed for special librarys
// that know the dangers of importing private APIs
exports.emberVirtualPackages.add('@ember/-internals');
// these are not public API but they're included in ember-source, so for

@@ -53,4 +59,2 @@ // correctness we still want to understand that they come from there.

exports.emberVirtualPackages.add('@glimmer/manager');
// ember-data pre 4.12 failed to declare this as a peer dependency of @ember-data/debug
exports.emberVirtualPeerDeps.add('@ember-data/store');
// These are the known names that people use to import template precomiplation

@@ -57,0 +61,0 @@ // macros from.

export { AppMeta, AddonMeta, PackageInfo } from './metadata';
export { explicitRelative, extensionsPattern, unrelativize, cleanUrl, getUrlQueryParams, correspondingTemplate, } from './paths';
export { explicitRelative, extensionsPattern, unrelativize, cleanUrl, correspondingTemplate } from './paths';
export { getOrCreate } from './get-or-create';

@@ -18,2 +18,1 @@ export { default as Package, V2AddonPackage as AddonPackage, V2AppPackage as AppPackage, V2Package } from './package';

export * from './dep-validation';
export * from './colocation';

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.locateEmbroiderWorkingDir = exports.cacheBustingPluginVersion = exports.cacheBustingPluginPath = exports.cacheBustingPlugin = exports.templateColocationPluginPath = exports.templateColocationPlugin = exports.hbsToJS = exports.tmpdir = exports.packageName = exports.babelFilter = exports.RewrittenPackageCache = exports.PackageCache = exports.Package = exports.getOrCreate = exports.correspondingTemplate = exports.getUrlQueryParams = exports.cleanUrl = exports.unrelativize = exports.extensionsPattern = exports.explicitRelative = void 0;
exports.locateEmbroiderWorkingDir = exports.cacheBustingPluginVersion = exports.cacheBustingPluginPath = exports.cacheBustingPlugin = exports.templateColocationPluginPath = exports.templateColocationPlugin = exports.hbsToJS = exports.tmpdir = exports.packageName = exports.babelFilter = exports.RewrittenPackageCache = exports.PackageCache = exports.Package = exports.getOrCreate = exports.correspondingTemplate = exports.cleanUrl = exports.unrelativize = exports.extensionsPattern = exports.explicitRelative = void 0;
var paths_1 = require("./paths");

@@ -27,3 +27,2 @@ Object.defineProperty(exports, "explicitRelative", { enumerable: true, get: function () { return paths_1.explicitRelative; } });

Object.defineProperty(exports, "cleanUrl", { enumerable: true, get: function () { return paths_1.cleanUrl; } });
Object.defineProperty(exports, "getUrlQueryParams", { enumerable: true, get: function () { return paths_1.getUrlQueryParams; } });
Object.defineProperty(exports, "correspondingTemplate", { enumerable: true, get: function () { return paths_1.correspondingTemplate; } });

@@ -58,3 +57,2 @@ var get_or_create_1 = require("./get-or-create");

__exportStar(require("./dep-validation"), exports);
__exportStar(require("./colocation"), exports);
//# sourceMappingURL=index.js.map

@@ -67,6 +67,2 @@ "use strict";

let candidate = filename;
const virtualPrefix = 'embroider_virtual:';
if (candidate.includes(virtualPrefix)) {
candidate = candidate.replace(/^.*embroider_virtual:/, '');
}
// first we look through our cached packages for any that are rooted right

@@ -73,0 +69,0 @@ // at or above the file.

@@ -14,3 +14,3 @@ import type { AddonMeta, AppMeta, PackageInfo } from './metadata';

get meta(): AddonMeta | AppMeta | undefined;
isEmberAddon(): boolean;
isEmberPackage(): boolean;
isEngine(): boolean;

@@ -20,3 +20,2 @@ isLazyEngine(): boolean;

isV2App(): this is V2AppPackage;
needsLooseResolving(): boolean;
isV2Addon(): this is V2AddonPackage;

@@ -23,0 +22,0 @@ findDescendants(filter?: (pkg: Package) => boolean): Package[];

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

}
isEmberAddon() {
isEmberPackage() {
let keywords = this.packageJSON.keywords;

@@ -73,4 +73,3 @@ return Boolean(keywords && keywords.includes('ember-addon'));

isV2Ember() {
return ((0, get_1.default)(this.packageJSON, 'ember-addon.version') === 2 &&
((0, get_1.default)(this.packageJSON, 'ember-addon.type') === 'app' || this.isEmberAddon()));
return this.isEmberPackage() && (0, get_1.default)(this.packageJSON, 'ember-addon.version') === 2;
}

@@ -80,6 +79,2 @@ isV2App() {

}
needsLooseResolving() {
var _a;
return this.isV2App() || ((_a = (this.isV2Addon() && this.meta['auto-upgraded'])) !== null && _a !== void 0 ? _a : false);
}
isV2Addon() {

@@ -86,0 +81,0 @@ return this.isV2Ember() && this.packageJSON['ember-addon'].type === 'addon';

@@ -6,3 +6,2 @@ import type Package from './package';

export declare function cleanUrl(url: string): string;
export declare function getUrlQueryParams(url: string): string;
export declare function correspondingTemplate(filename: string): string;

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

exports.cleanUrl = cleanUrl;
exports.getUrlQueryParams = getUrlQueryParams;
exports.correspondingTemplate = correspondingTemplate;

@@ -22,3 +21,3 @@ const path_1 = require("path");

}
if ((0, path_1.isAbsolute)(toFile) && result.split(path_1.sep).join('/').endsWith(toFile)) {
if ((0, path_1.isAbsolute)(toFile) && result.endsWith(toFile)) {
// this prevents silly "relative" paths like

@@ -52,13 +51,5 @@ // "../../../../../Users/you/projects/your/stuff" when we could have just

// cache-busting query params from leaking where they shouldn't.
// includeHashSign true means #my-specifier is considered part of the pathname
function cleanUrl(url) {
const regexp = postfixRE;
return url.replace(regexp, '');
return url.replace(postfixRE, '');
}
// includeHashSign true means #my-specifier is considered part of the pathname
function getUrlQueryParams(url) {
var _a, _b;
const regexp = postfixRE;
return (_b = (_a = url.match(regexp)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '';
}
// given a filename, returns it with the hbs extension

@@ -65,0 +56,0 @@ // for instance, passing filename.js returns filename.hbs

@@ -172,4 +172,4 @@ "use strict";

}
isEmberAddon() {
return this.plainPkg.isEmberAddon();
isEmberPackage() {
return this.plainPkg.isEmberPackage();
}

@@ -191,5 +191,2 @@ isEngine() {

}
needsLooseResolving() {
return this.plainPkg.needsLooseResolving();
}
// it's important that we're calling this.dependencies here at this level, not

@@ -196,0 +193,0 @@ // plainPkg.dependencies, which wouldn't be correct

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

let owningPackage = _1.PackageCache.shared('embroider', state.opts.appRoot).ownerOfFile(filename);
if (!owningPackage || !owningPackage.needsLooseResolving()) {
if (!owningPackage || !owningPackage.isV2Ember() || !owningPackage.meta['auto-upgraded']) {
debug('not handling colocation for %s', filename);

@@ -34,0 +34,0 @@ return;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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