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

single-spa-angular

Package Overview
Dependencies
Maintainers
14
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

single-spa-angular - npm Package Compare versions

Comparing version 4.9.0 to 4.9.1

2

package.json
{
"$schema": "../node_modules/ng-packagr/ng-package.schema.json",
"name": "single-spa-angular",
"version": "4.9.0",
"version": "4.9.1",
"description": "Helpers for building single-spa applications which use Angular 2",

@@ -6,0 +6,0 @@ "schematics": "./schematics/schematics.json",

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

const dependencies_1 = require("@schematics/angular/utility/dependencies");
const path_1 = require("path");
const core_1 = require("@angular-devkit/core");
// The JSON5 format supports comments and all Angular projects,

@@ -52,6 +52,5 @@ // starting from version 10, contain comments in `tsconfig` files.

const project = getClientProject(host, options);
const path = path_1.normalize(project.workspace.root);
const path = core_1.normalize(project.workspace.root);
const templateSource = schematics_1.apply(schematics_1.url('./_files'), [
schematics_1.applyTemplates({
atLeastAngular8: atLeastAngular8(),
prefix: project.workspace.prefix,

@@ -81,9 +80,4 @@ routing: options.routing,

const workspacePath = config_1.getWorkspacePath(host);
if (atLeastAngular8()) {
updateProjectNewAngular(context, clientProject, project.name);
updateTSConfig(host, clientProject);
}
else {
updateProjectOldAngular(context, clientProject, project);
}
updateProjectNewAngular(context, clientProject, project.name);
updateTSConfig(host, clientProject);
host.overwrite(workspacePath, JSON.stringify(workspace, null, 2));

@@ -97,13 +91,2 @@ context.logger.info(`Updated angular.json configuration`);

exports.updateConfiguration = updateConfiguration;
function updateProjectOldAngular(context, clientProject, project) {
context.logger.info('Using single-spa-angular builder for Angular versions before 8');
// Copy configuration from build architect
clientProject.architect['single-spa'] = clientProject.architect.build;
clientProject.architect['single-spa'].builder = 'single-spa-angular:build';
clientProject.architect['single-spa'].options.main = `${project.workspace.sourceRoot}/main.single-spa.ts`;
// Copy configuration from the serve architect
clientProject.architect['single-spa-serve'] = clientProject.architect.serve;
clientProject.architect['single-spa-serve'].builder = 'single-spa-angular:dev-server';
clientProject.architect['single-spa-serve'].options.browserTarget = `${project.name}:single-spa`;
}
function updateProjectNewAngular(context, clientProject, projectName) {

@@ -114,5 +97,5 @@ context.logger.info('Using @angular-devkit/custom-webpack builder.');

buildTarget.builder = browserBuilder;
buildTarget.options.main = path_1.join(clientProject.root, 'src/main.single-spa.ts');
buildTarget.options.main = core_1.join(core_1.normalize(clientProject.root), core_1.normalize('src/main.single-spa.ts'));
buildTarget.options.customWebpackConfig = {
path: path_1.join(clientProject.root, 'extra-webpack.config.js'),
path: core_1.join(core_1.normalize(clientProject.root), 'extra-webpack.config.js'),
libraryName: projectName,

@@ -137,3 +120,3 @@ libraryTarget: 'umd',

// because we remove `polyfills` from Webpack `entry` property.
tsConfig.files = ['src/main.single-spa.ts'];
tsConfig.files = [core_1.normalize('src/main.single-spa.ts')];
host.overwrite(tsConfigPath, JSON.stringify(tsConfig, null, 2));

@@ -164,6 +147,2 @@ }

}
function atLeastAngular8() {
const { VERSION } = require('@angular/core');
return Number(VERSION.major) >= 8;
}
function updateConfigurationsAndDisableOutputHashing(clientProject) {

@@ -170,0 +149,0 @@ const configurations = clientProject.architect.build.configurations;

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