Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
421 changes: 293 additions & 128 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
"eslint-plugin-jsdoc": "^54.0.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"fs-extra": "^11.3.1",
"glob": "^7.1.6",
"glob": "^11.0.3",
"http-proxy": "^1.18.1",
"http-server": "^14.1.1",
"i18n-lint": "^1.1.0",
Expand Down
4 changes: 2 additions & 2 deletions projects/storefrontstyles/test/scss.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const path = require('path');
const sassTrue = require('sass-true');
const glob = require('glob');
const { globSync } = require('glob');

describe('Scss Styles', () => {
const testFiles = glob.sync(
const testFiles = globSync(
path.resolve(process.cwd(), `test/**/*.spec.scss`)
);

Expand Down
4 changes: 2 additions & 2 deletions tools/breaking-changes/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ExtractorResult,
} from '@microsoft/api-extractor';
import * as fs from 'fs';
import * as glob from 'glob';
import { globSync } from 'glob';
import * as path from 'path';
import { escapePackageName } from './common';

Expand All @@ -27,7 +27,7 @@ if (!fs.existsSync(`${spartacusHomeDir}/temp`)) {
fs.mkdirSync(`${spartacusHomeDir}/temp`);
}

const files = glob.sync(`${spartacusHomeDir}/dist/**/public_api.d.ts`);
const files = globSync(`${spartacusHomeDir}/dist/**/public_api.d.ts`);
console.log(`Found ${files.length} entry points to process.`);
files.forEach((file: any, index: any) => {
console.log(
Expand Down
4 changes: 2 additions & 2 deletions tools/breaking-changes/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import * as fs from 'fs';
import * as glob from 'glob';
import { globSync } from 'glob';
import { unEscapePackageName } from './common';
/**
* This script combines all the json api files produced by MS Api Extractor in one file with a
Expand All @@ -26,7 +26,7 @@ import { unEscapePackageName } from './common';
const spartacusHomeDir = process.argv[2];
console.log(`Parsing public API for libs in ${spartacusHomeDir}/temp.`);

const files = glob.sync(`${spartacusHomeDir}/temp/*.api.json`);
const files = globSync(`${spartacusHomeDir}/temp/*.api.json`);
console.log(`Found ${files.length} api.json files.`);
const publicApiData: any[] = [];
files.forEach((file) => {
Expand Down
37 changes: 33 additions & 4 deletions tools/build-lib/augmented-types/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions tools/build-lib/augmented-types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import {
import { NgPackagrBuilderOptions } from '@angular-devkit/build-angular';
import { JsonObject, logging } from '@angular-devkit/core';
import { promises as fs } from 'fs';
import * as globModule from 'glob';
import { globSync } from 'glob';
import * as path from 'path';
import { from, Observable, of } from 'rxjs';
import { switchMap } from 'rxjs/operators';
import { promisify } from 'util';
const glob = promisify(globModule);

const DELIMITER_START = '/** AUGMENTABLE_TYPES_START */';
const DELIMITER_END = '/** AUGMENTABLE_TYPES_END */';
Expand Down Expand Up @@ -94,7 +92,7 @@ async function propagateAugmentableTypes(
logger: logging.LoggerApi
) {
// grab all package.json files
const files = await glob(libPath + '/**/package.json');
const files = globSync(libPath + '/**/package.json', { nodir: true });

for (const packageJsonFile of files) {
try {
Expand Down
6 changes: 3 additions & 3 deletions tools/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { execSync } from 'child_process';
import { Command } from 'commander';
import { readFileSync } from 'fs';
import glob from 'glob';
import { globSync } from 'glob';
import { chalk } from '../chalk';
import { NG_PACKAGE_JSON, PACKAGE_JSON } from './const';
import { manageDependencies } from './manage-dependencies';
Expand Down Expand Up @@ -224,7 +224,7 @@ export type Repository = { [library: string]: Library };
/**
* Paths to `package.json` files for all libraries.
*/
const librariesPaths = glob.sync(
const librariesPaths = globSync(
`{core-libs,feature-libs,integration-libs,projects}/!(node_modules)/${PACKAGE_JSON}`,
{
ignore: [
Expand All @@ -243,7 +243,7 @@ const repository = librariesPaths
libraryPath.length - `/${PACKAGE_JSON}`.length
);

const ngPackageFilesPaths = glob.sync(`${directory}/**/${NG_PACKAGE_JSON}`);
const ngPackageFilesPaths = globSync(`${directory}/**/${NG_PACKAGE_JSON}`);
const entryPoints = ngPackageFilesPaths.map((ngPackagePath) => {
const ngPackageFileContent = readJsonFile(ngPackagePath);
const pathWithoutLibDirectory = ngPackagePath.substring(directory.length);
Expand Down
8 changes: 4 additions & 4 deletions tools/config/manage-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import { execSync } from 'child_process';
import fs, { readFileSync } from 'fs';
import glob from 'glob';
import { globSync } from 'glob';
import * as path from 'path';
import postcss from 'postcss-scss';
import semver from 'semver';
Expand Down Expand Up @@ -152,7 +152,7 @@ export function manageDependencies(
const scssImports: LibraryWithDependencies['scssImports'] = {};

// Gather data about ts imports
const tsFilesPaths = glob.sync(`${library.directory}/**/*.ts`, {
const tsFilesPaths = globSync(`${library.directory}/**/*.ts`, {
// Ignore assets json translation scripts
// TODO: Remove when translation script will be moved to lib builder
ignore: [`projects/assets/generate-translations-*.ts`],
Expand Down Expand Up @@ -186,7 +186,7 @@ export function manageDependencies(
});

// Gather data about scss imports
const scssFilesPaths = glob.sync(`${library.directory}/**/*.scss`);
const scssFilesPaths = globSync(`${library.directory}/**/*.scss`);

scssFilesPaths.forEach((fileName) => {
const ast = postcss.parse(readFileSync(fileName).toString());
Expand Down Expand Up @@ -1041,7 +1041,7 @@ function checkForLockFile(
reportProgress('Checking for unnecessary `package-lock.json` files');
let errorsFound = false;
Object.values(libraries).forEach((lib) => {
const lockFile = glob.sync(`${lib.directory}/package-lock.json`);
const lockFile = globSync(`${lib.directory}/package-lock.json`);
if (lockFile.length > 0) {
errorsFound = true;
error(
Expand Down
6 changes: 3 additions & 3 deletions tools/config/tsconfig-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import { assign, parse, stringify } from 'comment-json';
import fs from 'fs';
import glob from 'glob';
import { globSync } from 'glob';
import path from 'path';
import { SPARTACUS_SCHEMATICS, SPARTACUS_SCOPE } from './const';
import {
Expand Down Expand Up @@ -219,7 +219,7 @@ function updateTestTsConfig(
entryPoints: Record<string, string[]>,
options: ProgramOptions
): boolean {
const schematicsTsConfigPaths = glob.sync(path);
const schematicsTsConfigPaths = globSync(path);
if (!schematicsTsConfigPaths.length) {
return false;
}
Expand All @@ -242,7 +242,7 @@ function handleLibConfigs(
}
let showAllGood = true;
Object.values(libraries).forEach((library) => {
const libraryTsConfigPaths = glob.sync(
const libraryTsConfigPaths = globSync(
`${library.directory}/tsconfig.lib.json`
);
if (libraryTsConfigPaths.length) {
Expand Down
4 changes: 2 additions & 2 deletions tools/schematics/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { ChildProcess, exec, execSync } from 'child_process';
import { prompt } from 'enquirer';
import fs from 'fs';
import glob from 'glob';
import { globSync } from 'glob';
import path from 'path';
import { chalk } from '../chalk';

Expand Down Expand Up @@ -141,7 +141,7 @@ function getPackageJsonFiles(): string[] {
'projects/storefrontstyles/package.json',
'projects/schematics/package.json',
];
const distFiles = glob.sync(`dist/!(node_modules)/package.json`);
const distFiles = globSync(`dist/!(node_modules)/package.json`);
return [...sourceFiles, ...distFiles];
}

Expand Down
Loading