Sync SharedCode snapshot from dfae1cb
This commit is contained in:
1 parent
efc7aae0aa
commit
aa19576a50
2 files changed
+57
-45
No files matched your search
@@ -1,42 +1,42 @@
|
||||
{
|
||||
"name": "@gabriel20xx/web-ui",
|
||||
"version": "0.1.1",
|
||||
"description": "Shared Svelte UI, layout, authentication, and account components for Gabriel20xx web projects.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"src",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": [
|
||||
"**/*.css"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"svelte": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/package": "^2.5.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||
"package": "svelte-package"
|
||||
},
|
||||
"svelte": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"svelte": "./src/index.ts",
|
||||
"import": "./src/index.ts"
|
||||
},
|
||||
"./styles.css": "./src/lib/styles.css",
|
||||
"./package.json": "./package.json"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "@gabriel20xx/web-ui",
|
||||
"version": "0.1.1",
|
||||
"description": "Shared Svelte UI, layout, authentication, and account components for Gabriel20xx web projects.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"src",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": [
|
||||
"**/*.css"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"svelte": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/package": "^2.5.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||
"package": "svelte-package"
|
||||
},
|
||||
"svelte": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"svelte": "./src/index.ts",
|
||||
"import": "./src/index.ts"
|
||||
},
|
||||
"./styles.css": "./src/lib/styles.css",
|
||||
"./package.json": "./package.json"
|
||||
}
|
||||
}
|
||||
@@ -40,8 +40,15 @@ function Invoke-GitText {
|
||||
$output = & git -C $WorkingDirectory @Arguments 2>&1
|
||||
$exitCode = $LASTEXITCODE
|
||||
if ($exitCode -ne 0) {
|
||||
$details = ($output | ForEach-Object { [string]$_ }) -join [Environment]::NewLine
|
||||
throw "git $($Arguments -join ' ') failed in '$WorkingDirectory'. $details"
|
||||
$diagnostics = @($output | ForEach-Object { [string]$_ } | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
|
||||
$blockingDiagnostics = @($diagnostics | Where-Object { $_ -notmatch '^\s*(warning|hint):' })
|
||||
if ($blockingDiagnostics.Count -eq 0) {
|
||||
$diagnostics | ForEach-Object { Write-Warning $_ }
|
||||
}
|
||||
else {
|
||||
$details = $diagnostics -join [Environment]::NewLine
|
||||
throw "git $($Arguments -join ' ') failed in '$WorkingDirectory'. $details"
|
||||
}
|
||||
}
|
||||
|
||||
return @($output | ForEach-Object { [string]$_ })
|
||||
@@ -84,7 +91,8 @@ function Write-Utf8NoBom {
|
||||
)
|
||||
|
||||
$encoding = New-Object System.Text.UTF8Encoding($false)
|
||||
[System.IO.File]::WriteAllText($Path, $Content, $encoding)
|
||||
$normalizedContent = $Content.Replace("`r`n", "`n").Replace("`r", "`n")
|
||||
[System.IO.File]::WriteAllText($Path, $normalizedContent, $encoding)
|
||||
}
|
||||
|
||||
function Convert-ToConsumerWebUiPackage {
|
||||
@@ -284,6 +292,10 @@ foreach ($relativeProject in $consumerProjects) {
|
||||
$commitArguments = @('commit', '--only', '-m', $commitMessage, '--') + $targetPaths
|
||||
$commitOutput = @(Invoke-GitText -WorkingDirectory $projectRoot -Arguments $commitArguments)
|
||||
$commitOutput | ForEach-Object { Write-Host " $_" }
|
||||
$remainingStagedChanges = @(Invoke-GitText -WorkingDirectory $projectRoot -Arguments (@('diff', '--cached', '--name-only', '--') + $targetPaths))
|
||||
if ($remainingStagedChanges.Count -gt 0) {
|
||||
throw 'The generated synchronization changes remain staged after the commit.'
|
||||
}
|
||||
}
|
||||
|
||||
if ($Push) {
|
||||
|
||||
Reference in new issue
Block a user