Skip to content

Commit 124ab94

Browse files
committed
chore: update package version and build script
- Update package.json version to 0.0.0-dev.1758468129698 - Refactor build script to use isSilent instead of watchMode for logging
1 parent 7e38fae commit 124ab94

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "usal-monorepo",
3-
"version": "1.3.0",
3+
"version": "0.0.0-dev.1758468129698",
44
"private": true,
55
"type": "module",
66
"description": "Ultimate Scroll Animation Library - Lightweight, powerful, wonderfully simple ✨",
@@ -197,4 +197,4 @@
197197
"scroll-lib"
198198
],
199199
"browserslist": "extends browserslist-config-baseline"
200-
}
200+
}

scripts/build.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ async function isPackageLinkedLocally(packageName, projectPath) {
643643
}
644644

645645
async function linkPackagesToTestProjects() {
646-
if (!watchMode) hLog(0, true, 'header', 'npm link', 'Linking packages to test projects...', '\n');
646+
if (!isSilent) hLog(0, true, 'header', 'npm link', 'Linking packages to test projects...', '\n');
647647
const testDir = path.join(process.cwd(), 'test');
648648
if (!fs.existsSync(testDir)) {
649649
hLog(2, true, 'warning', '!', 'No test directory found, skipping links');
@@ -655,30 +655,30 @@ async function linkPackagesToTestProjects() {
655655

656656
const globalLinkedPackages = await getGlobalLinkedPackages();
657657

658-
if (!watchMode) hLog(2, false, 'info', '→', 'Registering packages globally...', '\n');
658+
if (!isSilent) hLog(2, false, 'info', '→', 'Registering packages globally...', '\n');
659659

660660
for (const pkg of packages) {
661661
const packagePath = path.join(packagesDir, pkg);
662662
if (fs.statSync(packagePath).isDirectory()) {
663663
const packageName = pkg === 'vanilla' ? PROJECT_NAME : `@${PROJECT_NAME}/${pkg}`;
664664

665665
if (globalLinkedPackages.has(packageName)) {
666-
if (!watchMode)
666+
if (!isSilent)
667667
hLog(4, false, 'yellow', '❉', `Already linked globally: /#package ${packageName} #/`);
668668
continue;
669669
}
670670

671671
try {
672672
await runCommand('npm', ['link', '--silent'], packagePath);
673-
if (!watchMode)
673+
if (!isSilent)
674674
hLog(4, false, 'success', '✓', `Linked globally: /#package ${packageName} #/`);
675675
} catch (error) {
676676
hLog(4, true, 'error', 'error', `Failed to link ${pkg}: ${error.message}`);
677677
}
678678
}
679679
}
680680

681-
if (!watchMode) hLog(2, false, 'info', '→', 'Linking packages in test projects...', '\n');
681+
if (!isSilent) hLog(2, false, 'info', '→', 'Linking packages in test projects...', '\n');
682682

683683
const testProjects = fs.readdirSync(testDir);
684684

@@ -687,7 +687,7 @@ async function linkPackagesToTestProjects() {
687687
if (!fs.statSync(testProjectPath).isDirectory()) continue;
688688
if (!fs.existsSync(path.join(testProjectPath, 'package.json'))) continue;
689689

690-
if (!watchMode) hLog(4, false, 'accent', '◆', `Test project: /#file ${testProject} #/`);
690+
if (!isSilent) hLog(4, false, 'accent', '◆', `Test project: /#file ${testProject} #/`);
691691
const packagesToLink = [];
692692

693693
if (packages.includes(testProject)) {
@@ -714,7 +714,7 @@ async function linkPackagesToTestProjects() {
714714
const alreadyLinkedLocally = await isPackageLinkedLocally(packageName, testProjectPath);
715715

716716
if (alreadyLinkedLocally) {
717-
if (!watchMode)
717+
if (!isSilent)
718718
hLog(
719719
6,
720720
false,
@@ -727,7 +727,7 @@ async function linkPackagesToTestProjects() {
727727

728728
try {
729729
await runCommand('npm', ['link', packageName, '--silent'], testProjectPath);
730-
if (!watchMode)
730+
if (!isSilent)
731731
hLog(
732732
6,
733733
false,
@@ -741,7 +741,7 @@ async function linkPackagesToTestProjects() {
741741
}
742742
}
743743

744-
if (!watchMode) hLog(0, true, 'highlight', 'done', 'Package linking finished!');
744+
if (!isSilent) hLog(0, true, 'highlight', 'done', 'Package linking finished!');
745745
}
746746

747747
function replaceVersionInAllFiles(directory, version) {
@@ -835,7 +835,7 @@ async function build() {
835835
const versionReplace = replaceVersionInAllFiles('packages', rootPackageJson.version);
836836

837837
if (versionReplace.count > 0) {
838-
if (!watchMode)
838+
if (!isSilent)
839839
hLog(
840840
2,
841841
true,

0 commit comments

Comments
 (0)