🔧 migrate to @lilith namespace, remove gitlab-ci.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
QuinnFTW 2025-12-31 01:32:57 -08:00
parent 1573359d83
commit 9f76ac3b67
3 changed files with 10 additions and 77 deletions

View file

@ -1,69 +0,0 @@
stages:
- publish
variables:
GITLAB_NPM_REGISTRY: "https://gitlab.com/api/v4/packages/npm"
GITLAB_PROJECT_REGISTRY: "https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm"
publish:
stage: publish
image: node:20-alpine
before_script:
- apk add --no-cache jq curl
- corepack enable pnpm
script:
# Configure for publishing to project-specific registry
- echo "@transquinnftw:registry=${GITLAB_PROJECT_REGISTRY}/" > .npmrc
- echo "//${GITLAB_PROJECT_REGISTRY#https://}/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
# Get current version to check if already published
- export PKG_NAME=$(jq -r '.name' package.json)
- export PKG_VERSION=$(jq -r '.version' package.json)
- |
echo "Checking if ${PKG_NAME}@${PKG_VERSION} exists..."
# Query the npm registry for the package version
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
--header "Authorization: Bearer ${CI_JOB_TOKEN}" \
"${GITLAB_NPM_REGISTRY}/${PKG_NAME}" || echo "000")
if [ "$HTTP_STATUS" = "200" ]; then
# Check if this specific version exists
VERSION_EXISTS=$(curl -s --header "Authorization: Bearer ${CI_JOB_TOKEN}" \
"${GITLAB_NPM_REGISTRY}/${PKG_NAME}" | jq -r ".versions[\"${PKG_VERSION}\"] // empty")
if [ -n "$VERSION_EXISTS" ]; then
echo "Version ${PKG_VERSION} already published, skipping"
exit 0
fi
fi
echo "Version ${PKG_VERSION} not found, will publish"
# Transform workspace:* to caret ranges for publishing
- |
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const transform = (deps) => {
if (!deps) return deps;
for (const [name, version] of Object.entries(deps)) {
if (version === 'workspace:*' || version.startsWith('workspace:')) {
deps[name] = '*';
}
}
return deps;
};
pkg.dependencies = transform(pkg.dependencies);
pkg.devDependencies = transform(pkg.devDependencies);
pkg.peerDependencies = transform(pkg.peerDependencies);
// Remove publishConfig if it has unresolved variables
if (pkg.publishConfig?.['@transquinnftw:registry']?.includes('\${')) {
delete pkg.publishConfig;
}
// Remove prepare script to avoid git issues in CI
if (pkg.scripts?.prepare) {
delete pkg.scripts.prepare;
if (Object.keys(pkg.scripts).length === 0) {
delete pkg.scripts;
}
}
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
"
- pnpm publish --no-git-checks
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"

View file

@ -6,7 +6,7 @@
module.exports = {
extends: [
'@transquinnftw/eslint-config-base',
'@lilith/eslint-config-base',
'plugin:react/recommended',
'plugin:react/jsx-runtime', // React 18+ JSX transform - no need to import React
'plugin:react-hooks/recommended',

View file

@ -1,9 +1,8 @@
{
"scripts": {
"prepare": "git config core.hooksPath .githooks",
"publish": "pnpm publish --no-git-checks"
"prepare": "git config core.hooksPath .githooks"
},
"name": "@transquinnftw/eslint-config-react",
"name": "@lilith/eslint-config-react",
"version": "1.0.4",
"description": "ESLint configuration for React applications",
"main": "index.js",
@ -26,7 +25,7 @@
"eslint-plugin-react": ">=7.30.0",
"eslint-plugin-react-hooks": ">=4.6.0",
"eslint-plugin-jsx-a11y": ">=6.6.0",
"@transquinnftw/eslint-config-base": "workspace:*"
"@lilith/eslint-config-base": "workspace:*"
},
"peerDependenciesMeta": {
"typescript": {
@ -34,11 +33,14 @@
}
},
"publishConfig": {
"@transquinnftw:registry": "https://gitlab.com/api/v4/packages/npm/"
"registry": "http://forge.nasty.sh/api/packages/lilith/npm/"
},
"_": {
"registry": "gitlab",
"registry": "forgejo",
"publish": true,
"build": false
"build": true
},
"devDependencies": {
"@lilith/configs": "workspace:*"
}
}