From bd5ca526433c79fd32eee62ea60adec4332d95e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Krzy=C5=BCanowski?= Date: Tue, 6 Feb 2024 20:51:46 +0100 Subject: [PATCH] feat(packages): actually remove semantic-release and embrace lerna --- .github/workflows/release.yml | 2 +- package.json | 4 -- .../lib/release.config.js | 66 ------------------- packages/semantic-release-config/package.json | 29 -------- .../semantic-release-config/release.config.js | 3 - packages/typescript-config/package.json | 19 ++++++ packages/typescript-config/tsconfig.json | 48 ++++++++++++++ 7 files changed, 68 insertions(+), 103 deletions(-) delete mode 100644 packages/semantic-release-config/lib/release.config.js delete mode 100644 packages/semantic-release-config/package.json delete mode 100644 packages/semantic-release-config/release.config.js create mode 100644 packages/typescript-config/package.json create mode 100644 packages/typescript-config/tsconfig.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e9d66e..ff9dd2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,4 +24,4 @@ jobs: CI: true GH_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release \ No newline at end of file + run: npx lerna publish --yes \ No newline at end of file diff --git a/package.json b/package.json index fc7f38d..d27e416 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,6 @@ "name": "nucleus", "version": "0.0.0", "description": "Shared build tools for TypeScript and frontend projects", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, "repository": { "type": "git", "url": "git+https://github.com/exile-watch/nucleus.git" diff --git a/packages/semantic-release-config/lib/release.config.js b/packages/semantic-release-config/lib/release.config.js deleted file mode 100644 index 14c3378..0000000 --- a/packages/semantic-release-config/lib/release.config.js +++ /dev/null @@ -1,66 +0,0 @@ -const baseCommitPreset = { - parserOpts: { - noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'], - }, - preset: 'conventionalcommits', -} - -module.exports = { - branches: ['main'], - plugins: [ - [ - '@semantic-release/commit-analyzer', - { - ...baseCommitPreset, - releaseRules: [ - {breaking: true, release: 'major'}, - {revert: true, release: 'patch'}, - {type: 'feat', release: 'minor'}, - {type: 'fix', release: 'patch'}, - {type: 'docs', release: 'patch'}, - {type: 'style', release: 'patch'}, - {type: 'refactor', release: 'patch'}, - {type: 'perf', release: 'patch'}, - {type: 'test', release: 'patch'}, - {type: 'build', release: 'patch'}, - {type: 'ci', release: 'patch'}, - {type: 'chore', release: 'patch'}, - ], - }, - ], - [ - '@semantic-release/release-notes-generator', - { - ...baseCommitPreset, - presetConfig: { - types: [ - {section: 'Features', type: 'feat'}, - {section: 'Bug Fixes', type: 'fix'}, - {section: 'Documentation', type: 'docs'}, - {section: 'Code Quality', type: 'style'}, - {section: 'Code Quality', type: 'refactor'}, - {section: 'Code Quality', type: 'perf'}, - {section: 'Code Quality', type: 'test'}, - {section: 'Build & Deploy', type: 'build'}, - {section: 'Build & Deploy', type: 'ci'}, - {section: 'Internal', type: 'chore'}, - ], - }, - }, - ], - '@semantic-release/changelog', - '@semantic-release/npm', - [ - '@semantic-release/git', - { - assets: [ - 'CHANGELOG.md', - 'package.json', - 'package-lock.json' - ], - message: 'chore(bump-version): ${nextRelease.version} [skip ci]', - }, - ], - '@semantic-release/github', - ], -} \ No newline at end of file diff --git a/packages/semantic-release-config/package.json b/packages/semantic-release-config/package.json deleted file mode 100644 index 0d42992..0000000 --- a/packages/semantic-release-config/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@exile-watch/semantic-release-config", - "version": "0.0.0", - "description": "Shared semantic-release configuration for exile.watch projects", - "scripts": { - "semantic-release": "semantic-release" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/exile-watch/nucleus.git" - }, - "main": "lib/release.config.js", - "files": [ - "lib/release.config.js" - ], - "license": "ISC", - "bugs": { - "url": "https://github.com/exile-watch/nucleus/issues" - }, - "homepage": "https://github.com/exile-watch/nucleus#readme", - "peerDependencies": { - "semantic-release": "^23" - }, - "devDependencies": { - "@semantic-release/changelog": "^6.0.3", - "@semantic-release/git": "^10.0.1", - "semantic-release": "^23.0.0" - } -} diff --git a/packages/semantic-release-config/release.config.js b/packages/semantic-release-config/release.config.js deleted file mode 100644 index 505e877..0000000 --- a/packages/semantic-release-config/release.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: './lib/release.config.js', -} \ No newline at end of file diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json new file mode 100644 index 0000000..ea22c80 --- /dev/null +++ b/packages/typescript-config/package.json @@ -0,0 +1,19 @@ +{ + "name": "@exile-watch/typescript-config", + "version": "0.0.0", + "description": "Shared TypeScript configuration for exile.watch frontend projects", + "main": "tsconfig.json", + "files": [ + "tsconfig.json" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/exile-watch/nucleus.git" + }, + "author": "Sebastian Krzyzanowski", + "license": "ISC", + "homepage": "https://github.com/exile-watch/nucleus#readme", + "dependencies": { + "typescript": "^5.3.3" + } +} diff --git a/packages/typescript-config/tsconfig.json b/packages/typescript-config/tsconfig.json new file mode 100644 index 0000000..2b87ce5 --- /dev/null +++ b/packages/typescript-config/tsconfig.json @@ -0,0 +1,48 @@ +{ + "compilerOptions": { + "baseUrl": "./src", + + "sourceMap": true, + + "skipLibCheck": true, + "target": "esnext", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + + "forceConsistentCasingInFileNames": true, + + "module": "esnext", + + "moduleResolution": "node", + + "checkJs": true, + + "noEmit": true, + + "strict": true, + + "noImplicitReturns": false, + "noImplicitThis": true, + "noImplicitAny": false, + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "noFallthroughCasesInSwitch": true, + "downlevelIteration": true, + "importHelpers": true, + "allowUnreachableCode": false + + // @see: https: //www.typescriptlang.org/tsconfig#typeRoots + // "typeRoots": + + // @see https: //www.typescriptlang.org/tsconfig#types + // "types": + }, + "$schema": "https://json.schemastore.org/tsconfig" +} \ No newline at end of file