feat: publishing workflow

refactor: update changelog
v3.0.0-next.0
This commit is contained in:
2023-06-30 13:14:27 +02:00
parent 0a7e6af141
commit 4e4c7b5cc9
56 changed files with 2456 additions and 192 deletions

View File

@@ -1,54 +0,0 @@
image: registry.gitlab.com/openstapps/projectmanagement/node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules
before_script:
- npm install
stages:
- build
- test
- audit
- deploy
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
audit:
allow_failure: true
except:
- schedules
script:
- npm audit
stage: audit
scheduled-audit:
only:
- schedules
script:
- npm audit
stage: audit
unit:
stage: test
script:
- npm test
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
artifacts:
paths:
- public

View File

@@ -1,5 +1,120 @@
# @openstapps/minimal-connector
## 3.0.0-next.0
### Major Changes
- 64caebaf: Move project to a turbo monorepo & pnpm
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
- Removed extraneous files from packages
- `.npmrc`
- `.npmignore`
- `.mailmap`
- `.gitignore`
- `CONTRIBUTING.md`
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
- `package-lock.json`
- `.editorconfig`
- `.eslintrc.json` (moved eslint config to `package.json`)
- `.eslintignore`
- `.gitlab-ci.yml` (Most workflows are workspace-level)
- `.gitlab/**` (issue templates etc. are now workspace-level)
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
- Replaced conventional changelog with changesets
- Apps with binaries now use a top level `app.js`
```js
#!/usr/bin/env node
import './lib/app.js';
```
- 64caebaf: Migrate to ESM
CommonJS is no longer supported in any capacity. To use the new
version, you will need to migrate your package to ESM.
We recommend using `tsup` and `Node 18`.
```json
{
"type": "module"
}
```
- 64caebaf: Migrate package to Node 18
- Consumers of this package will need to migrate to Node 18 or
higher.
- Packages have been migrated from promisified `readFile` or
`readFileSync` towards `fs/promises`
- Packages use native `flatMap` now
- 64caebaf: Migrate build system to `tsup`
All packages now use an `index.ts` file to expose contents.
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
### Minor Changes
- 64caebaf: Migrate tests to C8/Chai/Mocha
- `@testdeck` OOP testing has been removed.
- Tests have been unified
- CommonJS module mocking has been replaced through
refactoring of tests, as ES Modules cannot be mocked
(do yourself a favor and don't try to mock them)
- C8 now replaces NYC as a native coverage tool
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
```ts
import {mapAsyncLimit} from '@openstapps/collection-utils';
await mapAsyncLimit(
[1, 2, 3],
async it => {
await someNetworkRequest(it);
},
5,
);
```
### Patch Changes
- 64caebaf: Migrated changelogs to changeset format
```js
import fs from 'fs';
const path = 'packages/logger/CHANGELOG.md';
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
```
- 98546a97: Migrate away from @openstapps/configuration
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [0a7e6af1]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- @openstapps/api@3.0.0-next.0
- @openstapps/logger@3.0.0-next.0
- @openstapps/core@3.0.0-next.0
## [0.2.0](https://gitlab.com/openstapps/minimal-connector/compare/v0.1.0...v0.2.0) (2019-02-07)
## [0.1.0](https://gitlab.com/openstapps/minimal-connector/compare/v0.0.2...v0.1.0) (2019-01-30)

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/minimal-connector",
"description": "This is a minimal connector which serves as an example",
"version": "2.0.0",
"version": "3.0.0-next.0",
"private": true,
"type": "module",
"license": "GPL-3.0-only",
@@ -18,8 +18,9 @@
"files": [
"app.js",
"lib",
"Dockerfile",
"README.md",
"Dockerfile"
"CHANGELOG.md"
],
"scripts": {
"build": "tsup-node --dts",

View File

@@ -1,38 +0,0 @@
## Summary
(Summarize the bug encountered concisely)
## Steps to reproduce
(How one can reproduce the issue - this is very important)
## Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
## What is the current bug behavior?
(What actually happens)
## What is the expected correct behavior?
(What you should see instead)
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~meeting

View File

@@ -1,16 +0,0 @@
## Description
(Describe the feature that you're requesting concisely)
## Explanation
(Explain why the feature is necessary)
## Dependencies, issues to be resolved beforehand
(List issues or dependencies that need to be resolved before this feature can be implemented)
/label ~meeting

View File

@@ -1,5 +1,12 @@
{
"name": "@openstapps/minimal-deployment",
"version": "2.0.0",
"private": true
"private": true,
"files": [
"database",
"systemd",
"docker-compose.yml",
"README.md",
"start.sh"
]
}

View File

@@ -0,0 +1,122 @@
# @openstapps/minimal-plugin
## 3.0.0-next.0
### Major Changes
- 64caebaf: Move project to a turbo monorepo & pnpm
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
- Removed extraneous files from packages
- `.npmrc`
- `.npmignore`
- `.mailmap`
- `.gitignore`
- `CONTRIBUTING.md`
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
- `package-lock.json`
- `.editorconfig`
- `.eslintrc.json` (moved eslint config to `package.json`)
- `.eslintignore`
- `.gitlab-ci.yml` (Most workflows are workspace-level)
- `.gitlab/**` (issue templates etc. are now workspace-level)
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
- Replaced conventional changelog with changesets
- Apps with binaries now use a top level `app.js`
```js
#!/usr/bin/env node
import './lib/app.js';
```
- 64caebaf: Migrate to ESM
CommonJS is no longer supported in any capacity. To use the new
version, you will need to migrate your package to ESM.
We recommend using `tsup` and `Node 18`.
```json
{
"type": "module"
}
```
- 64caebaf: Migrate package to Node 18
- Consumers of this package will need to migrate to Node 18 or
higher.
- Packages have been migrated from promisified `readFile` or
`readFileSync` towards `fs/promises`
- Packages use native `flatMap` now
- 64caebaf: Migrate build system to `tsup`
All packages now use an `index.ts` file to expose contents.
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
### Minor Changes
- 64caebaf: Migrate tests to C8/Chai/Mocha
- `@testdeck` OOP testing has been removed.
- Tests have been unified
- CommonJS module mocking has been replaced through
refactoring of tests, as ES Modules cannot be mocked
(do yourself a favor and don't try to mock them)
- C8 now replaces NYC as a native coverage tool
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
```ts
import {mapAsyncLimit} from '@openstapps/collection-utils';
await mapAsyncLimit(
[1, 2, 3],
async it => {
await someNetworkRequest(it);
},
5,
);
```
### Patch Changes
- 64caebaf: Migrated changelogs to changeset format
```js
import fs from 'fs';
const path = 'packages/logger/CHANGELOG.md';
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
```
- 98546a97: Migrate away from @openstapps/configuration
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [0a7e6af1]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- @openstapps/core-tools@3.0.0-next.0
- @openstapps/api-plugin@3.0.0-next.0
- @openstapps/api@3.0.0-next.0
- @openstapps/logger@3.0.0-next.0
- @openstapps/core@3.0.0-next.0

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/minimal-plugin",
"description": "Minimal Plugin",
"version": "2.0.0",
"version": "3.0.0-next.0",
"private": true,
"type": "module",
"license": "GPL-3.0-only",
@@ -15,6 +15,7 @@
"app.js",
"lib",
"README.md",
"CHANGELOG.md",
"Dockerfile"
],
"scripts": {