From fcc9e2760480d445e52f8373329f60f649c3a516 Mon Sep 17 00:00:00 2001 From: Ivo Murrell Date: Thu, 21 Nov 2024 16:12:33 +0000 Subject: [PATCH] feat(cloudsmith): create plugin to allow us to set cloudsmith options Tool Kit will not allow you to declare options for plugins that don't exist (to avoid the likely case that there was a typo), but we want to declare Cloudsmith specific options that are used to generate CircleCI config. Declare a barebones plugin to facilitate this. --- package-lock.json | 22 ++++++++++++++---- plugins/circleci-deploy/.toolkitrc.yml | 1 + plugins/circleci-deploy/package.json | 1 + plugins/cloudsmith/.toolkitrc.yml | 1 + plugins/cloudsmith/package.json | 31 ++++++++++++++++++++++++++ 5 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 plugins/cloudsmith/.toolkitrc.yml create mode 100644 plugins/cloudsmith/package.json diff --git a/package-lock.json b/package-lock.json index d43cb2ca7..e833bf6d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1093,6 +1093,7 @@ }, "core/sandbox": { "version": "1.0.0", + "extraneous": true, "license": "ISC", "workspaces": [ "packages/*" @@ -6449,6 +6450,10 @@ "resolved": "plugins/circleci-npm", "link": true }, + "node_modules/@dotcom-tool-kit/cloudsmith": { + "resolved": "plugins/cloudsmith", + "link": true + }, "node_modules/@dotcom-tool-kit/commitlint": { "resolved": "plugins/commitlint", "link": true @@ -25765,10 +25770,6 @@ "version": "2.1.2", "license": "MIT" }, - "node_modules/sandbox": { - "resolved": "core/sandbox", - "link": true - }, "node_modules/sax": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", @@ -30604,6 +30605,7 @@ "license": "ISC", "dependencies": { "@dotcom-tool-kit/circleci": "^7.0.2", + "@dotcom-tool-kit/cloudsmith": "^0.1.0", "tslib": "^2.3.1" }, "devDependencies": { @@ -30761,6 +30763,18 @@ "node": ">= 14" } }, + "plugins/cloudsmith": { + "name": "@dotcom-tool-kit/cloudsmith", + "version": "0.1.0", + "license": "ISC", + "engines": { + "node": "18.x || 20.x", + "npm": "7.x || 8.x || 9.x || 10.x" + }, + "peerDependencies": { + "dotcom-tool-kit": "4.x" + } + }, "plugins/commitlint": { "name": "@dotcom-tool-kit/commitlint", "version": "1.0.0", diff --git a/plugins/circleci-deploy/.toolkitrc.yml b/plugins/circleci-deploy/.toolkitrc.yml index df84c6170..8c9b04f4e 100644 --- a/plugins/circleci-deploy/.toolkitrc.yml +++ b/plugins/circleci-deploy/.toolkitrc.yml @@ -1,5 +1,6 @@ plugins: - '@dotcom-tool-kit/circleci' + - '@dotcom-tool-kit/cloudsmith' options: hooks: diff --git a/plugins/circleci-deploy/package.json b/plugins/circleci-deploy/package.json index 2908f7342..b7476a91f 100644 --- a/plugins/circleci-deploy/package.json +++ b/plugins/circleci-deploy/package.json @@ -11,6 +11,7 @@ "license": "ISC", "dependencies": { "@dotcom-tool-kit/circleci": "^7.0.2", + "@dotcom-tool-kit/cloudsmith": "^0.1.0", "tslib": "^2.3.1" }, "repository": { diff --git a/plugins/cloudsmith/.toolkitrc.yml b/plugins/cloudsmith/.toolkitrc.yml new file mode 100644 index 000000000..22817d2a9 --- /dev/null +++ b/plugins/cloudsmith/.toolkitrc.yml @@ -0,0 +1 @@ +version: 2 diff --git a/plugins/cloudsmith/package.json b/plugins/cloudsmith/package.json new file mode 100644 index 000000000..5f78fbb4f --- /dev/null +++ b/plugins/cloudsmith/package.json @@ -0,0 +1,31 @@ +{ + "name": "@dotcom-tool-kit/cloudsmith", + "version": "0.1.0", + "description": "", + "main": "lib", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "FT.com Platforms Team ", + "license": "ISC", + "repository": { + "type": "git", + "url": "https://github.com/financial-times/dotcom-tool-kit.git", + "directory": "plugins/cloudsmith" + }, + "bugs": "https://github.com/financial-times/dotcom-tool-kit/issues", + "homepage": "https://github.com/financial-times/dotcom-tool-kit/tree/main/plugins/cloudsmith", + "files": [ + "/lib", + ".toolkitrc.yml" + ], + "engines": { + "node": "18.x || 20.x", + "npm": "7.x || 8.x || 9.x || 10.x" + }, + "peerDependencies": { + "dotcom-tool-kit": "4.x" + } +} +