Skip to content

Commit

Permalink
chore(repo): update semantic-release and related deps
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip committed May 23, 2023
1 parent 664e259 commit 33deb2b
Show file tree
Hide file tree
Showing 15 changed files with 1,547 additions and 849 deletions.
17 changes: 12 additions & 5 deletions package.json
Expand Up @@ -48,6 +48,7 @@
]
},
"release": {
"extends": "semantic-release-monorepo",
"branches": [
{
"name": "develop",
Expand All @@ -59,17 +60,23 @@
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"semantic-release-yarn",
"@semantic-release/github",
[
"@semantic-release/github",
{
"addReleases": false
}
],
"@semantic-release/git"
]
},
"devDependencies": {
"@commitlint/cli": "^14.1.0",
"@commitlint/config-conventional": "^12.1.4",
"@octokit/core": "^3.5.1",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.2",
"@semantic-release/github": "https://registry.npmjs.org/@achingbrain/semantic-release-github/-/semantic-release-github-0.0.2.tgz",
"@semantic-release/release-notes-generator": "^10.0.3",
"@swc/core": "^1.2.210",
"@swc/jest": "^0.2.21",
"@types/file-entry-cache": "^5.0.2",
Expand Down Expand Up @@ -103,8 +110,8 @@
"node-powershell": "^4.0.0",
"patch-package": "^6.4.7",
"prettier": "^2.4.1",
"semantic-release": "^19.0.5",
"semantic-release-monorepo": "^7.0.5",
"semantic-release": "^21.0.2",
"semantic-release-monorepo": "https://registry.npmjs.org/@achingbrain/semantic-release-monorepo/-/semantic-release-monorepo-8.0.0.tgz",
"semantic-release-yarn": "^1.0.0",
"ts-jest": "^28.0.5",
"ts-node": "^10.8.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Expand Up @@ -29,7 +29,7 @@
"build.nix": "pkg . --targets linux,macos,alpine --out-path ./binaries",
"cli": "node -r ts-node/register/transpile-only -r tsconfig-paths/register src/index.ts",
"cli:debug": "node -r ts-node/register/transpile-only -r tsconfig-paths/register --inspect-brk src/index.ts",
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@stoplight/json": "~3.20.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Expand Up @@ -34,7 +34,7 @@
"node": "^12.20 || >= 14.13"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@stoplight/better-ajv-errors": "1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/formats/package.json
Expand Up @@ -19,7 +19,7 @@
"node": ">=12"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@stoplight/json": "^3.17.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/formatters/package.json
Expand Up @@ -22,7 +22,7 @@
"url": "https://github.com/stoplightio/spectral.git"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo",
"release": "semantic-release",
"pretest": "yarn prebuild",
"prelint": "yarn prebuild",
"prebuild": "node scripts/bundle-html-templates.mjs"
Expand Down
2 changes: 1 addition & 1 deletion packages/functions/package.json
Expand Up @@ -19,7 +19,7 @@
"node": ">=12"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@stoplight/better-ajv-errors": "1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/parsers/package.json
Expand Up @@ -18,7 +18,7 @@
"url": "https://github.com/stoplightio/spectral.git"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@stoplight/json": "~3.20.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ref-resolver/package.json
Expand Up @@ -18,7 +18,7 @@
"url": "https://github.com/stoplightio/spectral.git"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@stoplight/json-ref-readers": "1.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/ruleset-bundler/package.json
Expand Up @@ -35,7 +35,7 @@
"url": "https://github.com/stoplightio/spectral.git"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@rollup/plugin-commonjs": "~22.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/ruleset-migrator/package.json
Expand Up @@ -47,6 +47,6 @@
"scripts": {
"pretest": "ts-node -T ./scripts/generate-test-fixtures.ts && yarn prebuild",
"prebuild": "ts-node -T ./scripts/compile-schemas.ts",
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
}
}
2 changes: 1 addition & 1 deletion packages/rulesets/package.json
Expand Up @@ -18,7 +18,7 @@
"url": "https://github.com/stoplightio/spectral.git"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@asyncapi/specs": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Expand Up @@ -18,7 +18,7 @@
"url": "https://github.com/stoplightio/spectral.git"
},
"scripts": {
"release": "semantic-release -e semantic-release-monorepo"
"release": "semantic-release"
},
"dependencies": {
"@stoplight/json": "^3.20.1",
Expand Down
34 changes: 0 additions & 34 deletions patches/@semantic-release+github+8.0.1.patch

This file was deleted.

28 changes: 28 additions & 0 deletions patches/semantic-release+21.0.2.patch
@@ -0,0 +1,28 @@
diff --git a/node_modules/semantic-release/lib/get-config.js b/node_modules/semantic-release/lib/get-config.js
index 429577e..b75e375 100644
--- a/node_modules/semantic-release/lib/get-config.js
+++ b/node_modules/semantic-release/lib/get-config.js
@@ -1,6 +1,5 @@
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
-import { createRequire } from "node:module";

import { castArray, isNil, isPlainObject, isString, pickBy } from "lodash-es";
import { readPackageUp } from "read-pkg-up";
@@ -14,7 +13,6 @@ import { parseConfig, validatePlugin } from "./plugins/utils.js";

const debug = debugConfig("semantic-release:config");
const __dirname = dirname(fileURLToPath(import.meta.url));
-const require = createRequire(import.meta.url);

const CONFIG_NAME = "release";

@@ -35,7 +33,7 @@ export default async (context, cliOptions) => {
options = {
...(await castArray(extendPaths).reduce(async (eventualResult, extendPath) => {
const result = await eventualResult;
- const extendsOptions = require(resolveFrom.silent(__dirname, extendPath) || resolveFrom(cwd, extendPath));
+ const extendsOptions = import(resolveFrom.silent(__dirname, extendPath) || resolveFrom(cwd, extendPath));

// For each plugin defined in a shareable config, save in `pluginsPath` the extendable config path,
// so those plugin will be loaded relative to the config file

0 comments on commit 33deb2b

Please sign in to comment.