-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into N8N-5677-workflows-store-refactor
* master: (358 commits) refactor: Remove n8n-core dependency in nodes-base (no-changelog) (#5649) 🚀 Release 0.219.0 (#5659) fix(core): Fix trying to pipe a non stream on errors (no-changelog) (#5660) ci: Fix e2e tests (no-changelog) (#5658) fix(core): Fix issues with LDAP reset and LDAP init (no-changelog) (#5657) feat(HTTP Request Node): Move from Binary Buffer to Binary streaming (#5610) feat(editor): Only redirect new users to blank canvas (no-changelog) (#5654) feat(editor): Do not automatically add manual trigger on node plus (#5644) feat(core): Allow using middlewares with decorators on a per-route basis (no-changelog) (#5656) refactor(core): Convert more routes to use the decorator pattern (no-changelog) (#5611) fix: Fetch credentials on workflows view to include in duplicated workflows (#5532) ci: Add PR checklist (#5628) feat(Mindee Node): Add support for v4 API (#5559) feat(Microsoft SQL Node): Add support for self signed certificates (#5160) fix(editor): Only fetch new versions at app launch (#5647) fix(core): Use new version of riot-tmpl in workflow package (no-changelog) (#5619) feat(core): Refactor and add SAML preferences for service provider instance (#5637) docs(Github Trigger Node): Add notice and more meaningful error around permissions (#5551) feat(Cal Trigger Node): Update to support v2 webhooks (#5331) feat(editor): Redirect users to canvas if they don't have any workflows (#5629) ...
- Loading branch information
Showing
1,392 changed files
with
56,535 additions
and
23,789 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages/cli/src/databases/migrations/ @n8n-io/migrations-review |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import semver from 'semver'; | ||
import { writeFile, readFile } from 'fs/promises'; | ||
import { resolve } from 'path'; | ||
import child_process from 'child_process'; | ||
import { promisify } from 'util'; | ||
import assert from 'assert'; | ||
|
||
const exec = promisify(child_process.exec); | ||
|
||
const rootDir = process.cwd(); | ||
const releaseType = process.env.RELEASE_TYPE; | ||
assert.match(releaseType, /^(patch|minor|major)$/, 'Invalid RELEASE_TYPE'); | ||
|
||
// TODO: if releaseType is `auto` determine release type based on the changelog | ||
|
||
const lastTag = (await exec('git describe --tags --match "n8n@*" --abbrev=0')).stdout.trim(); | ||
const packages = JSON.parse((await exec('pnpm ls -r --only-projects --json')).stdout); | ||
|
||
const packageMap = {}; | ||
for (let { name, path, version, private: isPrivate, dependencies } of packages) { | ||
if (isPrivate && path !== rootDir) continue; | ||
if (path === rootDir) name = 'monorepo-root'; | ||
|
||
const isDirty = await exec(`git diff --quiet HEAD ${lastTag} -- ${path}`) | ||
.then(() => false) | ||
.catch((error) => true); | ||
|
||
packageMap[name] = { path, isDirty, version }; | ||
} | ||
|
||
assert.ok(packageMap['n8n'].isDirty, 'No changes found since the last release'); | ||
|
||
// Keep the monorepo version up to date with the released version | ||
packageMap['monorepo-root'].version = packageMap['n8n'].version; | ||
|
||
for (const packageName in packageMap) { | ||
const { path, version, isDirty } = packageMap[packageName]; | ||
const packageFile = resolve(path, 'package.json'); | ||
const packageJson = JSON.parse(await readFile(packageFile, 'utf-8')); | ||
|
||
packageJson.version = packageMap[packageName].nextVersion = | ||
isDirty || | ||
Object.keys(packageJson.dependencies).some( | ||
(dependencyName) => packageMap[dependencyName]?.isDirty, | ||
) | ||
? semver.inc(version, releaseType) | ||
: version; | ||
|
||
await writeFile(packageFile, JSON.stringify(packageJson, null, 2) + '\n'); | ||
} | ||
|
||
console.log(packageMap['n8n'].nextVersion); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"semver": "^7.3.8", | ||
"conventional-changelog-cli": "^2.2.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.