mirror of
https://github.com/iconify/iconify.git
synced 2024-12-22 09:48:54 +00:00
Remove Lerna, use custom script instead
This commit is contained in:
parent
ded43ed8fc
commit
c464934771
@ -69,13 +69,7 @@ Other packages:
|
||||
|
||||
## Installation
|
||||
|
||||
This monorepo uses Lerna to manage packages.
|
||||
|
||||
First you need to install Lerna:
|
||||
|
||||
```bash
|
||||
npm run install
|
||||
```
|
||||
This monorepo used Lerna to manage packages, but due to few bugs in Lerna, it was replaced with custom manager.
|
||||
|
||||
To install dependencies in all packages, run
|
||||
|
||||
|
3
monorepo/.gitignore
vendored
Normal file
3
monorepo/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
lib
|
35
monorepo/README.md
Normal file
35
monorepo/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Fix links
|
||||
|
||||
Unfortunately, Lerna is not being actively developed and it has a lot of issues.
|
||||
|
||||
One of those issues is inability to create links for local dependencies that depend on other local dependencies.
|
||||
|
||||
This is a basic script does the same as Lerna, but with few differences:
|
||||
|
||||
- It links everything, so dependencies of dependencies are correctly linked (broken in Lerna). For simplicity, it links everything.
|
||||
- It does not check versions. This means if you have multiple versions of the same package in monorepo, this script is not for you.
|
||||
|
||||
## Requirements
|
||||
|
||||
Script requires:
|
||||
|
||||
- NPM (not tested with other package managers)
|
||||
- Unix file system (TODO: test on Windows)
|
||||
|
||||
## Links
|
||||
|
||||
Script creates symbolic links for all local packages, except:
|
||||
|
||||
- Packages with `private` set to `true`.
|
||||
- Packages without version number (assumed to be private).
|
||||
|
||||
## Commands
|
||||
|
||||
- `bootstrap`: runs `npm install` for all packages, then creates symbolic links.
|
||||
- `link`: creates symbolic links (can be used to fix links after messing with packages).
|
||||
- `unlink`: removes local symbolic links.
|
||||
- `clean`: removes `node_modules` in all packages.
|
||||
|
||||
## Config file
|
||||
|
||||
This script usese `lerna.json`, where the only property that matters is `packages`.
|
13
monorepo/bootstrap.js
vendored
Normal file
13
monorepo/bootstrap.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* This script installs all dependencies and creates symbolic links for all packages inside monorepo.
|
||||
*/
|
||||
const { build } = require('./build');
|
||||
|
||||
build()
|
||||
.then((functions) => {
|
||||
functions.installAllPackages();
|
||||
functions.fixLinks();
|
||||
})
|
||||
.catch((err) => {
|
||||
process.exit(err);
|
||||
});
|
79
monorepo/build.js
Normal file
79
monorepo/build.js
Normal file
@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Build package
|
||||
*/
|
||||
const fs = require('fs');
|
||||
const child_process = require('child_process');
|
||||
|
||||
const rootDir = __dirname;
|
||||
const mainFile = rootDir + '/lib/index.js';
|
||||
|
||||
// Check if required modules in same monorepo are available
|
||||
const fileExists = (file) => {
|
||||
try {
|
||||
fs.statSync(file);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Build scripts, return imported main file on success
|
||||
*/
|
||||
function build() {
|
||||
return new Promise((fulfill, reject) => {
|
||||
// List of commands to execute
|
||||
const commands = [];
|
||||
|
||||
// Build script
|
||||
if (!fileExists(mainFile)) {
|
||||
commands.push({
|
||||
cmd: 'npm',
|
||||
args: ['run', 'build'],
|
||||
cwd: rootDir,
|
||||
});
|
||||
}
|
||||
|
||||
// Install dependencies before building
|
||||
if (!fileExists(rootDir + '/node_modules/typescript')) {
|
||||
commands.unshift({
|
||||
cmd: 'npm',
|
||||
args: ['install'],
|
||||
cwd: rootDir,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Run next command
|
||||
*/
|
||||
function next() {
|
||||
const item = commands.shift();
|
||||
if (item === void 0) {
|
||||
const functions = require(mainFile);
|
||||
fulfill(functions);
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.cwd === void 0) {
|
||||
item.cwd = rootDir;
|
||||
}
|
||||
|
||||
const result = child_process.spawnSync(item.cmd, item.args, {
|
||||
cwd: item.cwd,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
if (result.status === 0) {
|
||||
process.nextTick(next);
|
||||
} else {
|
||||
reject(result.status);
|
||||
return;
|
||||
}
|
||||
}
|
||||
next();
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
build,
|
||||
};
|
9
monorepo/clean.js
Normal file
9
monorepo/clean.js
Normal file
@ -0,0 +1,9 @@
|
||||
const { build } = require('./build');
|
||||
|
||||
build()
|
||||
.then((functions) => {
|
||||
functions.cleanWorkspaces();
|
||||
})
|
||||
.catch((err) => {
|
||||
process.exit(err);
|
||||
});
|
14
monorepo/link.js
Normal file
14
monorepo/link.js
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* This script creates symbolic links for all packages inside monorepo.
|
||||
*
|
||||
* `lerna link --force-local` does not link dependencies of dependencies, but this fix does.
|
||||
*/
|
||||
const { build } = require('./build');
|
||||
|
||||
build()
|
||||
.then((functions) => {
|
||||
functions.fixLinks();
|
||||
})
|
||||
.catch((err) => {
|
||||
process.exit(err);
|
||||
});
|
50
monorepo/package-lock.json
generated
Normal file
50
monorepo/package-lock.json
generated
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "@iconify/monorepo",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@iconify/monorepo",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.12",
|
||||
"typescript": "^4.5.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.12.tgz",
|
||||
"integrity": "sha512-4YpbAsnJXWYK/fpTVFlMIcUIho2AYCi4wg5aNPrG1ng7fn/1/RZfCIpRCiBX+12RVa34RluilnvCqD+g3KiSiA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
|
||||
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "17.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.12.tgz",
|
||||
"integrity": "sha512-4YpbAsnJXWYK/fpTVFlMIcUIho2AYCi4wg5aNPrG1ng7fn/1/RZfCIpRCiBX+12RVa34RluilnvCqD+g3KiSiA==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
|
||||
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
13
monorepo/package.json
Normal file
13
monorepo/package.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "@iconify/monorepo",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc -b"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.12",
|
||||
"typescript": "^4.5.5"
|
||||
}
|
||||
}
|
48
monorepo/src/add-links.ts
Normal file
48
monorepo/src/add-links.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import fs from 'fs';
|
||||
import type { PackageName, PackageInfo } from './types';
|
||||
import { pathToString } from './dirs';
|
||||
import { addToPath } from './dirs';
|
||||
import { scanPackages } from './packages';
|
||||
import { findWorkspaces } from './workspaces';
|
||||
import { createLink } from './link';
|
||||
|
||||
/**
|
||||
* Add all necessary symbolic links to workspace
|
||||
*/
|
||||
export function addLinksToWorkspace(workspace: PackageInfo) {
|
||||
// Get all packages
|
||||
const workspaces = findWorkspaces();
|
||||
|
||||
// Create node_module if it doesn't exist
|
||||
const moduleDir = addToPath(workspace.path, 'node_modules');
|
||||
try {
|
||||
fs.mkdirSync(pathToString(moduleDir), {
|
||||
recursive: true,
|
||||
});
|
||||
} catch (err) {
|
||||
//
|
||||
}
|
||||
|
||||
// Find all existing packages
|
||||
const linkedPackages: Set<PackageName> = new Set();
|
||||
const staticPackages: Set<PackageName> = new Set();
|
||||
scanPackages(moduleDir, (dirs, isLink) => {
|
||||
const packageName = dirs.join('/');
|
||||
(isLink ? linkedPackages : staticPackages).add(packageName);
|
||||
});
|
||||
|
||||
// Add links to other workspaces
|
||||
workspaces.forEach((info) => {
|
||||
// Ignore current package or package with existing link
|
||||
if (
|
||||
info.private ||
|
||||
info.name === workspace.name ||
|
||||
linkedPackages.has(info.name)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create link
|
||||
createLink(addToPath(moduleDir, info.name), info.path);
|
||||
});
|
||||
}
|
28
monorepo/src/clean.ts
Normal file
28
monorepo/src/clean.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import fs from 'fs';
|
||||
import { addToPath, pathToString, relativePath } from './dirs';
|
||||
import { PackageInfo } from './types';
|
||||
|
||||
/**
|
||||
* Remove node_modules
|
||||
*/
|
||||
export function cleanWorkspace(workspace: PackageInfo) {
|
||||
const modulesPath = addToPath(workspace.path, 'node_modules');
|
||||
const dir = pathToString(modulesPath);
|
||||
try {
|
||||
const stat = fs.lstatSync(dir);
|
||||
if (!stat.isDirectory()) {
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Removing:', relativePath(dir));
|
||||
try {
|
||||
fs.rmSync(dir, {
|
||||
recursive: true,
|
||||
});
|
||||
} catch (err) {
|
||||
//
|
||||
}
|
||||
}
|
95
monorepo/src/dirs.ts
Normal file
95
monorepo/src/dirs.ts
Normal file
@ -0,0 +1,95 @@
|
||||
import fs from 'fs';
|
||||
import { dirname } from 'path';
|
||||
import type { PathList } from './types';
|
||||
|
||||
export const fixDir = dirname(__dirname);
|
||||
export const rootDir = dirname(fixDir);
|
||||
|
||||
/**
|
||||
* Add entry to array of path elements
|
||||
*/
|
||||
export function addToPath(
|
||||
parentDirs: PathList,
|
||||
dir: PathList | string
|
||||
): PathList {
|
||||
let result = parentDirs.slice(0);
|
||||
if (dir instanceof Array) {
|
||||
result = result.concat(dir);
|
||||
} else {
|
||||
result.push(dir);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert array of path parts to string
|
||||
*/
|
||||
export function pathToString(path: PathList, absolute = true): string {
|
||||
const isAbsolute =
|
||||
path.length && (path[0] === '' || path[0].slice(0, 1) === '/');
|
||||
return (isAbsolute ? '' : absolute ? rootDir + '/' : './') + path.join('/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert string to array of path parts
|
||||
*/
|
||||
export function stringToPath(dir: string): PathList {
|
||||
// Absolute to relative
|
||||
if (dir.slice(0, rootDir.length) === rootDir) {
|
||||
dir = dir.slice(rootDir.length + 1);
|
||||
}
|
||||
|
||||
// Convert to array
|
||||
const parts = dir.split('/');
|
||||
|
||||
// Remove dot at start for relative paths
|
||||
if (parts[0] === '.') {
|
||||
parts.shift();
|
||||
}
|
||||
return parts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to get relative path from absolute
|
||||
*/
|
||||
export function relativePath(dir: string): string {
|
||||
if (dir.slice(0, rootDir.length) === rootDir) {
|
||||
return '.' + dir.slice(rootDir.length);
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subdirs list
|
||||
*/
|
||||
type FindSubdirsResult = Record<string, boolean>;
|
||||
|
||||
/**
|
||||
* Find sub-directories
|
||||
*/
|
||||
export function findSubdirs(
|
||||
parentPath: PathList,
|
||||
includeLinks?: boolean
|
||||
): FindSubdirsResult {
|
||||
const items: FindSubdirsResult = Object.create(null);
|
||||
|
||||
try {
|
||||
const files = fs.readdirSync(pathToString(parentPath));
|
||||
files.forEach((file) => {
|
||||
const filename = pathToString(addToPath(parentPath, file));
|
||||
try {
|
||||
const stat = fs.lstatSync(filename);
|
||||
if (includeLinks !== false && stat.isSymbolicLink()) {
|
||||
items[file] = true;
|
||||
} else if (stat.isDirectory() && !includeLinks) {
|
||||
items[file] = false;
|
||||
}
|
||||
} catch (err) {
|
||||
//
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
//
|
||||
}
|
||||
return items;
|
||||
}
|
20
monorepo/src/exec.ts
Normal file
20
monorepo/src/exec.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { spawnSync } from 'child_process';
|
||||
import { pathToString, relativePath } from './dirs';
|
||||
import { PackageInfo } from './types';
|
||||
|
||||
/**
|
||||
* Run NPM command
|
||||
*/
|
||||
export function runNPMCommand(workspace: PackageInfo, params: string[]): void {
|
||||
const cwd = pathToString(workspace.path);
|
||||
console.log(relativePath(cwd) + ':', 'npm', params.join(' '));
|
||||
const result = spawnSync('npm', params, {
|
||||
cwd,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
if (result.status !== 0) {
|
||||
throw new Error(
|
||||
`Failed to run "npm ${params.join(' ')}" at ${relativePath(cwd)}`
|
||||
);
|
||||
}
|
||||
}
|
34
monorepo/src/index.ts
Normal file
34
monorepo/src/index.ts
Normal file
@ -0,0 +1,34 @@
|
||||
import { addLinksToWorkspace } from './add-links';
|
||||
import { cleanWorkspace } from './clean';
|
||||
import { installAllPackages } from './install';
|
||||
import { removeLinksFromWorkspace } from './remove-links';
|
||||
import { findWorkspaces } from './workspaces';
|
||||
|
||||
/**
|
||||
* Fix links
|
||||
*/
|
||||
export function fixLinks(): void {
|
||||
const workspaces = findWorkspaces();
|
||||
workspaces.forEach(addLinksToWorkspace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove links
|
||||
*/
|
||||
export function removeLinks(): void {
|
||||
const workspaces = findWorkspaces();
|
||||
workspaces.forEach(removeLinksFromWorkspace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Install all packages
|
||||
*/
|
||||
export { installAllPackages };
|
||||
|
||||
/**
|
||||
* Clean
|
||||
*/
|
||||
export function cleanWorkspaces(): void {
|
||||
const workspaces = findWorkspaces();
|
||||
workspaces.forEach(cleanWorkspace);
|
||||
}
|
20
monorepo/src/install.ts
Normal file
20
monorepo/src/install.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { runNPMCommand } from './exec';
|
||||
import { PackageInfo } from './types';
|
||||
import { findWorkspaces } from './workspaces';
|
||||
|
||||
/**
|
||||
* Install packages
|
||||
*/
|
||||
export function installAllPackages(): void {
|
||||
const workspaces = findWorkspaces();
|
||||
for (let i = 0; i < workspaces.length; i++) {
|
||||
installPackages(workspaces[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Install packages in a workspace
|
||||
*/
|
||||
export function installPackages(workspace: PackageInfo): void {
|
||||
runNPMCommand(workspace, ['install']);
|
||||
}
|
74
monorepo/src/link.ts
Normal file
74
monorepo/src/link.ts
Normal file
@ -0,0 +1,74 @@
|
||||
import fs from 'fs';
|
||||
import { dirname } from 'path';
|
||||
import { addToPath, pathToString, relativePath } from './dirs';
|
||||
import type { PathList } from './types';
|
||||
|
||||
/**
|
||||
* Create symbolic link
|
||||
*/
|
||||
export function createLink(from: PathList, to: PathList, unlink = true): void {
|
||||
const fromDir = pathToString(from, true);
|
||||
const targetDir = pathToString(to, true);
|
||||
if (unlink) {
|
||||
rmdir(fromDir);
|
||||
}
|
||||
|
||||
// Create parent directory
|
||||
const dir = dirname(fromDir);
|
||||
try {
|
||||
fs.mkdirSync(dir, {
|
||||
recursive: true,
|
||||
});
|
||||
} catch (err) {
|
||||
//
|
||||
}
|
||||
|
||||
// Create link
|
||||
console.log(
|
||||
'Creating link:',
|
||||
relativePath(fromDir),
|
||||
'->',
|
||||
relativePath(targetDir)
|
||||
);
|
||||
fs.symlinkSync(targetDir, fromDir, 'dir');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove symbolic link
|
||||
*/
|
||||
export function removeLink(path: PathList, packageName: string): void {
|
||||
const dir = pathToString(addToPath(path, packageName));
|
||||
console.log('Removing link:', relativePath(dir));
|
||||
try {
|
||||
fs.unlinkSync(dir);
|
||||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove parent directory if empty
|
||||
if (packageName.split('/').length === 2) {
|
||||
const parentDir = dirname(dir);
|
||||
try {
|
||||
fs.rmSync(parentDir);
|
||||
} catch (err) {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove directory or link if exists, recursively
|
||||
*/
|
||||
function rmdir(dir: string) {
|
||||
try {
|
||||
const stat = fs.lstatSync(dir);
|
||||
if (stat.isDirectory() || stat.isSymbolicLink()) {
|
||||
console.log('Removing', dir);
|
||||
fs.rmSync(dir, {
|
||||
recursive: true,
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
//
|
||||
}
|
||||
}
|
76
monorepo/src/package.ts
Normal file
76
monorepo/src/package.ts
Normal file
@ -0,0 +1,76 @@
|
||||
import fs from 'fs';
|
||||
import type { PathList, PackageName, PackageInfo } from './types';
|
||||
import { fixDir } from './dirs';
|
||||
import { addToPath } from './dirs';
|
||||
import { pathToString } from './dirs';
|
||||
|
||||
/**
|
||||
* Get package name
|
||||
*/
|
||||
export function getPackageInfo(path: PathList): PackageInfo | null {
|
||||
const packageFilename = pathToString(addToPath(path, 'package.json'));
|
||||
|
||||
let name: unknown;
|
||||
let version: string;
|
||||
let isPrivate: boolean;
|
||||
try {
|
||||
const data = JSON.parse(
|
||||
fs.readFileSync(packageFilename, 'utf8')
|
||||
) as Record<string, unknown>;
|
||||
name = data.name;
|
||||
version = typeof data.version === 'string' ? data.version : '';
|
||||
isPrivate = version ? !!data.private : true;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
return typeof name === 'string'
|
||||
? {
|
||||
name,
|
||||
private: isPrivate,
|
||||
version,
|
||||
path,
|
||||
}
|
||||
: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get package name
|
||||
*/
|
||||
export function getPackageName(path: PathList): PackageName | null {
|
||||
const packageFilename = pathToString(addToPath(path, 'package.json'));
|
||||
|
||||
let packageName: unknown;
|
||||
try {
|
||||
packageName = JSON.parse(fs.readFileSync(packageFilename, 'utf8')).name;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
return typeof packageName === 'string' ? packageName : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if package exists
|
||||
*/
|
||||
export function packageExists(path: PathList, name: PackageName): boolean {
|
||||
const newPath = addToPath(path, name);
|
||||
return getPackageName(newPath) !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache
|
||||
*/
|
||||
let fixPackageName: PackageName;
|
||||
|
||||
/**
|
||||
* Get package name for fix
|
||||
*/
|
||||
export function getFixPackageName(): PackageName {
|
||||
if (!fixPackageName) {
|
||||
// Get name of current package
|
||||
fixPackageName = getPackageName([fixDir]);
|
||||
if (fixPackageName === null) {
|
||||
throw new Error('Cannot get package name for fix');
|
||||
}
|
||||
}
|
||||
return fixPackageName;
|
||||
}
|
43
monorepo/src/packages.ts
Normal file
43
monorepo/src/packages.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import type { PathList, PackageName } from './types';
|
||||
import { addToPath, findSubdirs } from './dirs';
|
||||
|
||||
/**
|
||||
* Callback for scanPackages()
|
||||
*/
|
||||
export type ScanPackagesCallback = (dirs: PathList, isLink: boolean) => void;
|
||||
|
||||
/**
|
||||
* Scan path for packages, using callback
|
||||
*/
|
||||
export function scanPackages(
|
||||
path: PathList,
|
||||
callback: ScanPackagesCallback
|
||||
): void {
|
||||
const subdirs = findSubdirs(path);
|
||||
Object.keys(subdirs).forEach((subdir) => {
|
||||
const isLink = subdirs[subdir];
|
||||
if (subdir.slice(0, 1) === '@' && !isLink) {
|
||||
// Namespace
|
||||
const nestedPath = addToPath(path, subdir);
|
||||
const subdirs2 = findSubdirs(nestedPath);
|
||||
Object.keys(subdirs2).forEach((subdir2) => {
|
||||
callback([subdir, subdir2], subdirs2[subdir2]);
|
||||
});
|
||||
} else {
|
||||
callback([subdir], isLink);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all linked packages
|
||||
*/
|
||||
export function findLinkedPackages(path: PathList): PackageName[] {
|
||||
const result = [];
|
||||
scanPackages(path, (dirs, isLink) => {
|
||||
if (isLink) {
|
||||
result.push(dirs.join('/'));
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
49
monorepo/src/remove-links.ts
Normal file
49
monorepo/src/remove-links.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import fs from 'fs';
|
||||
import type { PackageName, PackageInfo } from './types';
|
||||
import { pathToString } from './dirs';
|
||||
import { addToPath } from './dirs';
|
||||
import { scanPackages } from './packages';
|
||||
import { findWorkspaces } from './workspaces';
|
||||
import { removeLink } from './link';
|
||||
|
||||
// Cache
|
||||
let packageNames: Set<PackageName>;
|
||||
|
||||
/**
|
||||
* Get all local packages
|
||||
*/
|
||||
function getLocalPackages(): Set<PackageName> {
|
||||
if (!packageNames) {
|
||||
packageNames = new Set(findWorkspaces().map((item) => item.name));
|
||||
}
|
||||
|
||||
return packageNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all symbolic links from workspace
|
||||
*/
|
||||
export function removeLinksFromWorkspace(workspace: PackageInfo) {
|
||||
// Create node_module if it doesn't exist
|
||||
const modulesDir = addToPath(workspace.path, 'node_modules');
|
||||
try {
|
||||
fs.lstatSync(pathToString(modulesDir));
|
||||
} catch (err) {
|
||||
// Directory does not exist
|
||||
return;
|
||||
}
|
||||
|
||||
// Get all packages
|
||||
const localPackages = getLocalPackages();
|
||||
|
||||
// Find all existing packages
|
||||
scanPackages(modulesDir, (dirs, isLink) => {
|
||||
if (!isLink) {
|
||||
return;
|
||||
}
|
||||
const packageName = dirs.join('/');
|
||||
if (localPackages.has(packageName)) {
|
||||
removeLink(modulesDir, packageName);
|
||||
}
|
||||
});
|
||||
}
|
19
monorepo/src/types.ts
Normal file
19
monorepo/src/types.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* List of directories
|
||||
*/
|
||||
export type PathList = string[];
|
||||
|
||||
/**
|
||||
* Package name
|
||||
*/
|
||||
export type PackageName = string;
|
||||
|
||||
/**
|
||||
* Package info
|
||||
*/
|
||||
export interface PackageInfo {
|
||||
name: PackageName;
|
||||
private: boolean;
|
||||
version: string;
|
||||
path: PathList;
|
||||
}
|
58
monorepo/src/workspaces.ts
Normal file
58
monorepo/src/workspaces.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import type { PathList, PackageInfo } from './types';
|
||||
import { rootDir } from './dirs';
|
||||
import { addToPath, findSubdirs } from './dirs';
|
||||
import { getFixPackageName, getPackageInfo } from './package';
|
||||
|
||||
/**
|
||||
* Workspaces cache
|
||||
*/
|
||||
let workspaces: PackageInfo[];
|
||||
|
||||
/**
|
||||
* Find workspaces
|
||||
*/
|
||||
export function findWorkspaces(): PackageInfo[] {
|
||||
if (!workspaces) {
|
||||
workspaces = [];
|
||||
|
||||
// Get name of current package
|
||||
const fixPackageName = getFixPackageName();
|
||||
|
||||
function checkWorkspace(path: PathList) {
|
||||
const info = getPackageInfo(path);
|
||||
if (info && info.name !== fixPackageName) {
|
||||
workspaces.push({
|
||||
...info,
|
||||
path,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function checkEntry(parentPath: PathList, parts: PathList) {
|
||||
const nextParts = parts.slice(0);
|
||||
const next = nextParts.shift();
|
||||
const subdirs =
|
||||
next === '*'
|
||||
? Object.keys(findSubdirs(parentPath, false))
|
||||
: [next];
|
||||
|
||||
subdirs.forEach((subdir) => {
|
||||
const dir = addToPath(parentPath, subdir);
|
||||
if (nextParts.length) {
|
||||
checkEntry(dir, nextParts);
|
||||
} else {
|
||||
checkWorkspace(dir);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Check all workspaces from lerna.json
|
||||
const rootPackageJSON = require(rootDir + '/lerna.json');
|
||||
rootPackageJSON.packages?.forEach((value: string) => {
|
||||
checkEntry([], value.split('/'));
|
||||
});
|
||||
}
|
||||
|
||||
// Cache and return result
|
||||
return workspaces;
|
||||
}
|
15
monorepo/tsconfig.json
Normal file
15
monorepo/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"target": "ESNext",
|
||||
"module": "CommonJS",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"strict": false,
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
12
monorepo/unlink.js
Normal file
12
monorepo/unlink.js
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* This script removes symbolic links for all packages inside monorepo.
|
||||
*/
|
||||
const { build } = require('./build');
|
||||
|
||||
build()
|
||||
.then((functions) => {
|
||||
functions.removeLinks();
|
||||
})
|
||||
.catch((err) => {
|
||||
process.exit(err);
|
||||
});
|
13022
package-lock.json
generated
13022
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -11,12 +11,11 @@
|
||||
"url": "https://github.com/iconify/iconify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"bootstrap": "lerna bootstrap --force-local",
|
||||
"clean": "lerna clean",
|
||||
"link": "lerna link --force-local",
|
||||
"bootstrap": "node monorepo/bootstrap",
|
||||
"clean": "node monorepo/clean",
|
||||
"link": "node monorepo/link",
|
||||
"unlink": "node monorepo/unlink",
|
||||
"setup": "npm run clean && npm run bootstrap"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lerna": "^4.0.0"
|
||||
}
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
133
packages/nextjs-demo/package-lock.json
generated
133
packages/nextjs-demo/package-lock.json
generated
@ -850,25 +850,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/cross-fetch/node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
||||
},
|
||||
"node_modules/cross-fetch/node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
||||
},
|
||||
"node_modules/cross-fetch/node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
@ -900,16 +881,6 @@
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/encoding": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
|
||||
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"iconv-lite": "^0.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
||||
@ -955,19 +926,6 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
@ -1283,13 +1241,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
|
||||
@ -1405,10 +1356,29 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
||||
},
|
||||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
@ -2001,25 +1971,6 @@
|
||||
"requires": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
||||
"requires": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2043,16 +1994,6 @@
|
||||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
|
||||
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k="
|
||||
},
|
||||
"encoding": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
|
||||
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"iconv-lite": "^0.6.2"
|
||||
}
|
||||
},
|
||||
"escalade": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
||||
@ -2083,16 +2024,6 @@
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"peer": true
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
@ -2307,13 +2238,6 @@
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"scheduler": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
|
||||
@ -2403,10 +2327,29 @@
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
|
||||
},
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
||||
"requires": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
packages/react-demo/package-lock.json
generated
16
packages/react-demo/package-lock.json
generated
@ -461,15 +461,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@iconify/core": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.3.tgz",
|
||||
"integrity": "sha512-Q9hR/lOuo9USKilpl+wCYOEfyogx0ilBLIBLsYK5QV3LEPQOf2jgFwYAcQC/H0jDlKLvTFNrz3CHUVN0UUaVvg==",
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.4.tgz",
|
||||
"integrity": "sha512-2dO0HwahUPlrsOSoBZAdOClOz7VhIqjyWU5BqewGhQbhFkoA8TDVZhU2ug9ipruOUTHCRV2bM+j9lUJTdVNIGA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@iconify/api-redundancy": "^1.0.2",
|
||||
"@iconify/types": "^1.0.12",
|
||||
"@iconify/utils": "^1.0.21",
|
||||
"cross-fetch": "^3.1.4"
|
||||
"cross-fetch": "^3.1.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@iconify/react": {
|
||||
@ -1983,15 +1983,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"@iconify/core": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.3.tgz",
|
||||
"integrity": "sha512-Q9hR/lOuo9USKilpl+wCYOEfyogx0ilBLIBLsYK5QV3LEPQOf2jgFwYAcQC/H0jDlKLvTFNrz3CHUVN0UUaVvg==",
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.4.tgz",
|
||||
"integrity": "sha512-2dO0HwahUPlrsOSoBZAdOClOz7VhIqjyWU5BqewGhQbhFkoA8TDVZhU2ug9ipruOUTHCRV2bM+j9lUJTdVNIGA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@iconify/api-redundancy": "^1.0.2",
|
||||
"@iconify/types": "^1.0.12",
|
||||
"@iconify/utils": "^1.0.21",
|
||||
"cross-fetch": "^3.1.4"
|
||||
"cross-fetch": "^3.1.5"
|
||||
}
|
||||
},
|
||||
"@iconify/react": {
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "@iconify/react-demo",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
|
@ -2,6 +2,7 @@
|
||||
"name": "@iconify/sapper-demo",
|
||||
"description": "Sapper demo for Iconify for Svelte",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "sapper dev",
|
||||
"build": "sapper build --legacy",
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "svelte-demo-vite",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
113
packages/sveltekit-demo/package-lock.json
generated
113
packages/sveltekit-demo/package-lock.json
generated
@ -14,6 +14,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-icons/mdi-light": "^1.1.1",
|
||||
"@iconify/svelte": "^2.1.2",
|
||||
"@sveltejs/kit": "next",
|
||||
"@types/cookie": "^0.4.1",
|
||||
"svelte": "^3.46.2",
|
||||
@ -34,6 +35,18 @@
|
||||
"integrity": "sha512-jcc2WKucqUjJSiP4f1eRehD455ohLVJkwEGR43/VpxHLXjEoLkQDZ+PIS+Sf3X/pJ77DGWPo94417OXarxJNPw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@iconify/svelte": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/svelte/-/svelte-2.1.2.tgz",
|
||||
"integrity": "sha512-NvWPg/lKNDlzyB698vLv8hYT5eRDxSIk0QnMtB7UMOZ7/SbmInyBqsb8t3SXoCYVsNG3poznW+pwYrJZ7kY+mQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cross-fetch": "^3.1.5"
|
||||
},
|
||||
"funding": {
|
||||
"url": "http://github.com/sponsors/cyberalien"
|
||||
}
|
||||
},
|
||||
"node_modules/@lukeed/csprng": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.0.0.tgz",
|
||||
@ -277,6 +290,15 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-fetch": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"node-fetch": "2.6.7"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
@ -870,6 +892,26 @@
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
@ -1275,6 +1317,12 @@
|
||||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
|
||||
@ -1331,6 +1379,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
@ -1350,6 +1414,15 @@
|
||||
"integrity": "sha512-jcc2WKucqUjJSiP4f1eRehD455ohLVJkwEGR43/VpxHLXjEoLkQDZ+PIS+Sf3X/pJ77DGWPo94417OXarxJNPw==",
|
||||
"dev": true
|
||||
},
|
||||
"@iconify/svelte": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/svelte/-/svelte-2.1.2.tgz",
|
||||
"integrity": "sha512-NvWPg/lKNDlzyB698vLv8hYT5eRDxSIk0QnMtB7UMOZ7/SbmInyBqsb8t3SXoCYVsNG3poznW+pwYrJZ7kY+mQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-fetch": "^3.1.5"
|
||||
}
|
||||
},
|
||||
"@lukeed/csprng": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.0.0.tgz",
|
||||
@ -1530,6 +1603,15 @@
|
||||
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
|
||||
"integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA=="
|
||||
},
|
||||
"cross-fetch": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"node-fetch": "2.6.7"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
@ -1933,6 +2015,15 @@
|
||||
"integrity": "sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
@ -2176,6 +2267,12 @@
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
|
||||
"dev": true
|
||||
},
|
||||
"tslib": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
|
||||
@ -2201,6 +2298,22 @@
|
||||
"rollup": "^2.59.0"
|
||||
}
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=",
|
||||
"dev": true
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "sveltekit-demo",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "svelte-kit dev",
|
||||
"build": "svelte-kit build",
|
||||
|
4
packages/types/package-lock.json
generated
4
packages/types/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@iconify/types",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.12",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@iconify/types",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.12",
|
||||
"license": "(Apache-2.0 OR GPL-2.0)",
|
||||
"devDependencies": {
|
||||
"typescript": "^4.4.3"
|
||||
|
12
packages/utils/package-lock.json
generated
12
packages/utils/package-lock.json
generated
@ -2182,9 +2182,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.12.28",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.28.tgz",
|
||||
"integrity": "sha512-pZ0FrWZXlvQOATlp14lRSk1N9GkeJ3vLIwOcUoo3ICQn9WNR4rWoNi81pbn6sC1iYUy7QPqNzI3+AEzokwyVcA==",
|
||||
"version": "0.12.29",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz",
|
||||
"integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
@ -7062,9 +7062,9 @@
|
||||
}
|
||||
},
|
||||
"esbuild": {
|
||||
"version": "0.12.28",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.28.tgz",
|
||||
"integrity": "sha512-pZ0FrWZXlvQOATlp14lRSk1N9GkeJ3vLIwOcUoo3ICQn9WNR4rWoNi81pbn6sC1iYUy7QPqNzI3+AEzokwyVcA==",
|
||||
"version": "0.12.29",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz",
|
||||
"integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==",
|
||||
"dev": true
|
||||
},
|
||||
"escalade": {
|
||||
|
Loading…
Reference in New Issue
Block a user