From 23af2a30801bf685bcbb01de4c3d2ea04d0726be Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Tue, 17 Oct 2023 09:45:27 +0200 Subject: [PATCH 01/21] docs: dereferencing shapes --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index c7c7412..1d0cc3d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,16 @@ In this repository we develop the *Cube Schema* model. DRAFT: https://zazuko.github.io/cube-link/ +## Validation shapes + +The [validation](validation) directory contains various SHACL Shapes which can be used to ensure the correctness of datasets, cubes, hierarchies, and other. + +They can be retrieved from the web using an URI in the form of `https://cube.link/{VERSION}/shape/{CONSTRAINT}`, where the `{CONSTRAINT}` variable is replaced with any of the shape documents (without `.ttl`) and the `{VERSION}` variable is replaced with any [tag name](https://github.com/zazuko/cube-link/tags) or the word `latest`. It is recommended to always use specific version to avoid breaking changes. + +For example, to get version 0.0.4 of `standalone-cube-constraint.ttl`, fetch https://cube.link/v0.0.4/shape/standalone-cube-constraint + +Otherwise, to get the latest version, fetch https://cube.link/latest/shape/standalone-cube-constraint instead + ## How to Contribute Please open [Issues](https://github.com/zazuko/cube-link/issues) on this repository or provide PRs for contributions. From 6d65dcaff4cbc2475597a9351887ae6765de3aa4 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Mon, 16 Oct 2023 09:42:52 +0200 Subject: [PATCH 02/21] fix: adjust base URL of shapes --- .changeset/kind-geese-lie.md | 5 +++++ validation/basic-cube-constraint-ml.ttl | 6 +++--- validation/basic-cube-constraint.ttl | 4 ++-- validation/datacatalog-constraint.ttl | 16 ++++++++-------- validation/standalone-constraint-constraint.ttl | 8 ++++---- validation/standalone-cube-constraint.ttl | 8 ++++---- 6 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 .changeset/kind-geese-lie.md diff --git a/.changeset/kind-geese-lie.md b/.changeset/kind-geese-lie.md new file mode 100644 index 0000000..84b4071 --- /dev/null +++ b/.changeset/kind-geese-lie.md @@ -0,0 +1,5 @@ +--- +"cube-link": minor +--- + +Adjust shape base to match how they are deployed (re #94) diff --git a/validation/basic-cube-constraint-ml.ttl b/validation/basic-cube-constraint-ml.ttl index 40098ab..518869e 100644 --- a/validation/basic-cube-constraint-ml.ttl +++ b/validation/basic-cube-constraint-ml.ttl @@ -1,4 +1,4 @@ -@base . +@base . @prefix dash: . @prefix rdf: . @prefix rdfs: . @@ -46,7 +46,7 @@ sh:path sh:property ; sh:minCount 3 ; sh:message "cube:Constraint needs at least a certain amount of sh:properties" - ] , + ] , [ # we assume at least 3 dimensions, otherwise we would have an empty list of dimensions # one for cube:observedBy, one for rdf:type and at least one cube dimension @@ -69,4 +69,4 @@ sh:in (rdf:type cube:observedBy); ] ) - ] . \ No newline at end of file + ] . diff --git a/validation/basic-cube-constraint.ttl b/validation/basic-cube-constraint.ttl index 2ef3ef5..b2ef0eb 100644 --- a/validation/basic-cube-constraint.ttl +++ b/validation/basic-cube-constraint.ttl @@ -1,4 +1,4 @@ -@base . +@base . @prefix dash: . @prefix rdf: . @prefix rdfs: . @@ -46,4 +46,4 @@ sh:path sh:property ; sh:minCount 3 ; sh:message "cube:Constraint needs at least a certain amount of sh:properties" - ] . \ No newline at end of file + ] . diff --git a/validation/datacatalog-constraint.ttl b/validation/datacatalog-constraint.ttl index 0254da6..ba1cc89 100644 --- a/validation/datacatalog-constraint.ttl +++ b/validation/datacatalog-constraint.ttl @@ -1,4 +1,4 @@ -@base . +@base . @prefix dash: . @prefix rdf: . @prefix rdfs: . @@ -114,33 +114,33 @@ PREFIX dcterms: sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:message "schema:Dataset needs a schema:hasPart" - ] ; + ] ; sh:property [ sh:path void:sparqlEndpoint ; sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:message "schema:Dataset needs a void:sparqlEndpoint" - ] ; + ] ; sh:property [ sh:path void:rootResource ; sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:message "schema:Dataset needs a void:rootResource" - ] ; + ] ; sh:property [ sh:path void:exampleResource ; sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:message "schema:Dataset needs a void:exampleResource" - ] ; + ] ; sh:property [ sh:path dcat:distribution ; sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:node ; sh:message "schema:Dataset needs a valid dcat:Distribution" - ] ; - + ] ; + . @@ -171,4 +171,4 @@ PREFIX dcterms: sh:nodeKind sh:IRI ; sh:message "dcat:Distribution needs a valid dcat:downloadURL" ] ; - . \ No newline at end of file + . diff --git a/validation/standalone-constraint-constraint.ttl b/validation/standalone-constraint-constraint.ttl index 9cedcbd..50c0f1c 100644 --- a/validation/standalone-constraint-constraint.ttl +++ b/validation/standalone-constraint-constraint.ttl @@ -1,4 +1,4 @@ -@base . +@base . @prefix dash: . @prefix rdf: . @prefix rdfs: . @@ -73,7 +73,7 @@ sh:node ; sh:message "meta:dimensionRelation does not validate" ]; - + sh:or( [ sh:path schema:name; @@ -138,7 +138,7 @@ ] ) ; ] - . + . a sh:NodeShape ; sh:property [ @@ -239,4 +239,4 @@ sh:node ; sh:minCount 1; sh:message "inHierarchy requires a conform nextInHierarchy" - ] . \ No newline at end of file + ] . diff --git a/validation/standalone-cube-constraint.ttl b/validation/standalone-cube-constraint.ttl index df6e93c..d2a3bb7 100644 --- a/validation/standalone-cube-constraint.ttl +++ b/validation/standalone-cube-constraint.ttl @@ -1,4 +1,4 @@ -@base . +@base . @prefix dash: . @prefix rdf: . @prefix rdfs: . @@ -9,7 +9,7 @@ # # This is the bare minimal SHACL shape for validating a cube. -# All cubes should pass this validation. +# All cubes should pass this validation. # It does not validate the constraints # @@ -82,7 +82,7 @@ # optional, but recommended sh:path cube:observationConstraint ; sh:message "cube:Cube must point to a valid constraint" - ] + ] . @@ -104,4 +104,4 @@ sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:message "cube:Observation requires cube:observedBy" - ] . \ No newline at end of file + ] . From 9ca2d6e261e6d1f0c0c5c81980b34c163a6c92b1 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Tue, 17 Oct 2023 12:53:17 +0200 Subject: [PATCH 03/21] Update README.md Co-authored-by: Ludovic Muller --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1d0cc3d..615966c 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,12 @@ DRAFT: https://zazuko.github.io/cube-link/ The [validation](validation) directory contains various SHACL Shapes which can be used to ensure the correctness of datasets, cubes, hierarchies, and other. -They can be retrieved from the web using an URI in the form of `https://cube.link/{VERSION}/shape/{CONSTRAINT}`, where the `{CONSTRAINT}` variable is replaced with any of the shape documents (without `.ttl`) and the `{VERSION}` variable is replaced with any [tag name](https://github.com/zazuko/cube-link/tags) or the word `latest`. It is recommended to always use specific version to avoid breaking changes. +They can be retrieved from the web using an URI in the form of `https://cube.link/{VERSION}/shape/{CONSTRAINT}`, where the `{CONSTRAINT}` variable is replaced with any of the shape documents (without `.ttl`) and the `{VERSION}` variable is replaced with any [tag name](https://github.com/zazuko/cube-link/tags) or the word `latest`. +It is recommended to always use a specific version to avoid breaking changes. -For example, to get version 0.0.4 of `standalone-cube-constraint.ttl`, fetch https://cube.link/v0.0.4/shape/standalone-cube-constraint +For example, to get version 0.0.4 of `standalone-cube-constraint.ttl`, fetch https://cube.link/v0.0.4/shape/standalone-cube-constraint . -Otherwise, to get the latest version, fetch https://cube.link/latest/shape/standalone-cube-constraint instead +Otherwise, to get the latest version, fetch https://cube.link/latest/shape/standalone-cube-constraint instead. ## How to Contribute From a38baff8ed5c443caa9d4ed1aa7cb79d391a3453 Mon Sep 17 00:00:00 2001 From: Giacomo Citi Date: Wed, 25 Oct 2023 12:18:58 +0200 Subject: [PATCH 04/21] fix: observationConstraint vs. observationShape (#111) * fix: observationConstraint vs. observationShape * Create green-turkeys-give.md --------- Co-authored-by: Tomasz Pluskiewicz --- .changeset/green-turkeys-give.md | 5 +++++ validate.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/green-turkeys-give.md diff --git a/.changeset/green-turkeys-give.md b/.changeset/green-turkeys-give.md new file mode 100644 index 0000000..748aa46 --- /dev/null +++ b/.changeset/green-turkeys-give.md @@ -0,0 +1,5 @@ +--- +"cube-link": patch +--- + +Fixes the problem that validation script did not correctly target cube observations diff --git a/validate.js b/validate.js index 206c8fe..34b15f4 100644 --- a/validate.js +++ b/validate.js @@ -17,7 +17,7 @@ The cube and shape are connected on the fly with triples in the following patter _:b1 a sh:NodeShape; sh:targetNode ?cube; sh:property [ - sh:node ?observationShape; # from ?cube cube:observationShape ?observationShape + sh:node ?observationShape; # from ?cube cube:observationConstraint ?observationShape sh:path (cube:observationSet cube:observation); ]. @@ -32,7 +32,7 @@ async function validateCube (cube, shape) { clownface({ dataset: shape, term: rdf.blankNode() }) .addOut(ns.sh.targetNode, cubeRoot) .addOut(ns.sh.property, null, property => { - property.addOut(ns.sh.node, cubeRoot.out(ns.cube.observationShape)) + property.addOut(ns.sh.node, cubeRoot.out(ns.cube.observationConstraint)) property.addList(ns.sh.path, [ns.cube.observationSet, ns.cube.observation]) }) From 8ab9a808fc5dd8ec4545a56810472cb1282547b9 Mon Sep 17 00:00:00 2001 From: Giacomo Citi Date: Tue, 31 Oct 2023 08:22:40 +0100 Subject: [PATCH 05/21] doc: additional constraint in example (#113) doc: additional constraint in example --- documentation/core.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/core.md b/documentation/core.md index 335c7e0..e0d2471 100644 --- a/documentation/core.md +++ b/documentation/core.md @@ -174,13 +174,13 @@ To provide a generic solution that works for all numbers and IRIs, _Cube Schema_ a cube:Observation; ex:literalDimension ""^^cube:Undefined. -## Snippet for for the according shape: +## Snippet for the according shape: [ sh:path ex:literalDimension; sh:nodeKind sh:Literal; sh:or([ - sh:datatype xsd:string + sh:datatype xsd:string ; sh:minLength 1 ], [ sh:datatype cube:Undefined ]) @@ -191,6 +191,8 @@ To provide a generic solution that works for all numbers and IRIs, _Cube Schema_ If it is necessary to state why the value is `cube:Undefined`, annotations should be used. +Additional constraints (like `sh:minLength` in the example) may be placed within the _real_ data type so that they do not apply to undefined values. + ## Metadata From f39e111f7540cc7e053a79d4cb2b2be742546b71 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 31 Oct 2023 07:23:30 +0000 Subject: [PATCH 06/21] Version Packages --- .changeset/green-turkeys-give.md | 5 ----- .changeset/kind-geese-lie.md | 5 ----- CHANGELOG.md | 11 +++++++++++ package.json | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 .changeset/green-turkeys-give.md delete mode 100644 .changeset/kind-geese-lie.md create mode 100644 CHANGELOG.md diff --git a/.changeset/green-turkeys-give.md b/.changeset/green-turkeys-give.md deleted file mode 100644 index 748aa46..0000000 --- a/.changeset/green-turkeys-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"cube-link": patch ---- - -Fixes the problem that validation script did not correctly target cube observations diff --git a/.changeset/kind-geese-lie.md b/.changeset/kind-geese-lie.md deleted file mode 100644 index 84b4071..0000000 --- a/.changeset/kind-geese-lie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"cube-link": minor ---- - -Adjust shape base to match how they are deployed (re #94) diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..63481b2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# cube-link + +## 0.1.0 + +### Minor Changes + +- 6d65dca: Adjust shape base to match how they are deployed (re #94) + +### Patch Changes + +- a38baff: Fixes the problem that validation script did not correctly target cube observations diff --git a/package.json b/package.json index d035f18..5b7634d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cube-link", - "version": "0.0.5", + "version": "0.1.0", "description": "Cube Schema", "main": "validate.js", "scripts": { From edd0fee20f510affb8265fb57901efb087bbdd49 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Mon, 6 Nov 2023 12:29:13 +0100 Subject: [PATCH 07/21] ci: publishing (tag+npm) --- .changeset/config.json | 2 +- .github/workflows/release.yaml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index ab848d1..f26daf1 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,7 +4,7 @@ "commit": false, "fixed": [], "linked": [], - "access": "restricted", + "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d46537a..c293f8e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,11 @@ jobs: - name: Install Dependencies run: npm ci - - name: Create Release Pull Request + - name: Create Release Pull Request or Publish to npm uses: changesets/action@v1 + with: + # This expects you to have a script called release which does a build for your packages and calls changeset publish + publish: yarn release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 5fe0b8796f4f4a45e11ffb16557a9b03a9c9583c Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Mon, 6 Nov 2023 12:57:59 +0100 Subject: [PATCH 08/21] build: publish script --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5b7634d..3302a6b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build": "./build.sh", "trifid": "trifid --verbose --config=trifid/config.json", "trifid:local": "trifid --verbose --config=trifid/config.local.json", - "test": "standard" + "test": "standard", + "release": "changeset publish" }, "bin": { "cube-link": "bin/cube-link.js" From bd78da37d0dc70aa3eb08de82e99d06b1783a830 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Tue, 7 Nov 2023 11:34:58 +0100 Subject: [PATCH 09/21] ci: no npm package for now --- .github/workflows/release.yaml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c293f8e..c700f20 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: - name: Install Dependencies run: npm ci - - name: Create Release Pull Request or Publish to npm + - name: Create Release Pull Request or Create a GitHub Release + tag uses: changesets/action@v1 with: # This expects you to have a script called release which does a build for your packages and calls changeset publish diff --git a/package.json b/package.json index 3302a6b..31e54dc 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "trifid": "trifid --verbose --config=trifid/config.json", "trifid:local": "trifid --verbose --config=trifid/config.local.json", "test": "standard", - "release": "changeset publish" + "release": "changeset tag" }, "bin": { "cube-link": "bin/cube-link.js" From cac83c495bd29fe4a6ba22f059ad5ff5394b8101 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Tue, 7 Nov 2023 11:44:47 +0100 Subject: [PATCH 10/21] ci: tweak changesets config --- .changeset/config.json | 6 +++++- package.json | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.changeset/config.json b/.changeset/config.json index f26daf1..0158a2c 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,9 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": [], + "privatePackages": { + "tag": true, + "version": true + } } diff --git a/package.json b/package.json index 31e54dc..d49eee6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "cube-link", "version": "0.1.0", + "private": true, "description": "Cube Schema", "main": "validate.js", "scripts": { From 09e2f3db1ae79ca623c28907919c174f9d99b2a0 Mon Sep 17 00:00:00 2001 From: tpluscode Date: Tue, 28 Nov 2023 22:05:02 +0100 Subject: [PATCH 11/21] feat: send shapes directly without redirect --- .changeset/slimy-ravens-chew.md | 5 +++++ trifid/redirect.js | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .changeset/slimy-ravens-chew.md diff --git a/.changeset/slimy-ravens-chew.md b/.changeset/slimy-ravens-chew.md new file mode 100644 index 0000000..d3f8b52 --- /dev/null +++ b/.changeset/slimy-ravens-chew.md @@ -0,0 +1,5 @@ +--- +"cube-link": patch +--- + +Forward profiles directly from GitHub diff --git a/trifid/redirect.js b/trifid/redirect.js index 2384a54..45796d2 100644 --- a/trifid/redirect.js +++ b/trifid/redirect.js @@ -1,4 +1,5 @@ // @ts-check +const { Readable } = require('stream') const { fetchBuilder, MemoryCache } = require('node-fetch-cache') /** @@ -54,7 +55,19 @@ function factory () { } } if (shapePath) { - return res.redirect(`https://raw.githubusercontent.com/zazuko/cube-link/${versionPath}/validation/${shapePath}.ttl`) + return fetch(`https://raw.githubusercdontent.com/zazuko/cube-link/${versionPath}/validation/${shapePath}.ttl`) + .then(rawGithub => { + if (rawGithub.ok) { + res.set('Content-Type', 'text/turtle') + } else { + res.status(500) + } + Readable.fromWeb(rawGithub.body).pipe(res) + }) + .catch((e) => { + res.status(502) + res.send(`Error fetching shape: ${e.message}`) + }) } } From a287558839a80b6dff1cbfc61c7c28a77f4ce4e9 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Wed, 29 Nov 2023 09:13:31 +0100 Subject: [PATCH 12/21] Update trifid/redirect.js Co-authored-by: Ludovic Muller --- trifid/redirect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trifid/redirect.js b/trifid/redirect.js index 45796d2..67e70f6 100644 --- a/trifid/redirect.js +++ b/trifid/redirect.js @@ -55,7 +55,7 @@ function factory () { } } if (shapePath) { - return fetch(`https://raw.githubusercdontent.com/zazuko/cube-link/${versionPath}/validation/${shapePath}.ttl`) + return fetch(`https://raw.githubusercontent.com/zazuko/cube-link/${versionPath}/validation/${shapePath}.ttl`) .then(rawGithub => { if (rawGithub.ok) { res.set('Content-Type', 'text/turtle') From 8319742b08107c5a261413a92f977efd143f08e2 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Wed, 29 Nov 2023 09:17:10 +0100 Subject: [PATCH 13/21] refactor: code review --- trifid/redirect.js | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/trifid/redirect.js b/trifid/redirect.js index 67e70f6..ab5568b 100644 --- a/trifid/redirect.js +++ b/trifid/redirect.js @@ -55,19 +55,26 @@ function factory () { } } if (shapePath) { - return fetch(`https://raw.githubusercontent.com/zazuko/cube-link/${versionPath}/validation/${shapePath}.ttl`) - .then(rawGithub => { - if (rawGithub.ok) { - res.set('Content-Type', 'text/turtle') - } else { - res.status(500) - } - Readable.fromWeb(rawGithub.body).pipe(res) - }) - .catch((e) => { - res.status(502) - res.send(`Error fetching shape: ${e.message}`) - }) + try { + const rawGithub = await fetch(`https://raw.githubusercontent.com/zazuko/cube-link/${versionPath}/validation/${shapePath}.ttl`) + if (rawGithub.ok) { + res.set('Content-Type', 'text/turtle') + } else { + res.status(500) + } + // if the shape does not exist, we return a 404 + if (rawGithub.status === 404) { + return res.sendStatus(404) + } + /** @type {any | null} */ + const body = rawGithub.body + if (!rawGithub.body) { + throw new Error('No body') + } + return Readable.fromWeb(body).pipe(res) + } catch (e) { + return res.status(502).send(`Error fetching shape: ${e.message}`) + } } } From fe4c57330a319e584c94754644b2b50a3b6c839f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Nov 2023 08:56:11 +0000 Subject: [PATCH 14/21] Version Packages --- .changeset/slimy-ravens-chew.md | 5 ----- CHANGELOG.md | 6 ++++++ package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/slimy-ravens-chew.md diff --git a/.changeset/slimy-ravens-chew.md b/.changeset/slimy-ravens-chew.md deleted file mode 100644 index d3f8b52..0000000 --- a/.changeset/slimy-ravens-chew.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"cube-link": patch ---- - -Forward profiles directly from GitHub diff --git a/CHANGELOG.md b/CHANGELOG.md index 63481b2..5ce7fb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # cube-link +## 0.1.1 + +### Patch Changes + +- 09e2f3d: Forward profiles directly from GitHub + ## 0.1.0 ### Minor Changes diff --git a/package.json b/package.json index d49eee6..803e4a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cube-link", - "version": "0.1.0", + "version": "0.1.1", "private": true, "description": "Cube Schema", "main": "validate.js", From 9957e948308e4f50fed705808adbe645bd732ea4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Oct 2023 04:46:35 +0000 Subject: [PATCH 15/21] Bump browserify-sign from 4.2.1 to 4.2.2 Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2. - [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md) - [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2) --- updated-dependencies: - dependency-name: browserify-sign dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 237eab2..3012b5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3098,20 +3098,23 @@ "integrity": "sha512-UHBY3viPlJKf85YijDUcikKX6tmF4SokIDp518ZDVT92JNDcG5uKIthaT/owt3Sar0lwtOafsQuwrg22/v2Dwg==" }, "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz", + "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==", "peer": true, "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.4", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.6", + "readable-stream": "^3.6.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 4" } }, "node_modules/browserify-sign/node_modules/readable-stream": { From 7d52737274d9a3bfea371417e32662512004d1c3 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Wed, 29 Nov 2023 10:43:02 +0100 Subject: [PATCH 16/21] ci: use bot to do releases --- .github/workflows/release.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c700f20..53a98c9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,11 +23,18 @@ jobs: - name: Install Dependencies run: npm ci + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.GH_APP_ID }} + private_key: ${{ secrets.GH_PRIVATE_KEY }} + - name: Create Release Pull Request or Create a GitHub Release + tag uses: changesets/action@v1 with: # This expects you to have a script called release which does a build for your packages and calls changeset publish publish: yarn release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 6b782388208d452e870924ab0d018fa0d7457952 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Wed, 29 Nov 2023 12:30:38 +0100 Subject: [PATCH 17/21] chore: trigger CI deployment --- .changeset/long-dots-add.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/long-dots-add.md diff --git a/.changeset/long-dots-add.md b/.changeset/long-dots-add.md new file mode 100644 index 0000000..cb3c010 --- /dev/null +++ b/.changeset/long-dots-add.md @@ -0,0 +1,5 @@ +--- +"cube-link": patch +--- + +Bumping version only to trigger CI From fae85a0014aae7a0698dca605d31506cd7ef6717 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Nov 2023 11:55:51 +0000 Subject: [PATCH 18/21] Version Packages --- .changeset/long-dots-add.md | 5 ----- CHANGELOG.md | 6 ++++++ package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/long-dots-add.md diff --git a/.changeset/long-dots-add.md b/.changeset/long-dots-add.md deleted file mode 100644 index cb3c010..0000000 --- a/.changeset/long-dots-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"cube-link": patch ---- - -Bumping version only to trigger CI diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ce7fb6..a22e822 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # cube-link +## 0.1.2 + +### Patch Changes + +- 6b78238: Bumping version only to trigger CI + ## 0.1.1 ### Patch Changes diff --git a/package.json b/package.json index 803e4a9..693a38d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cube-link", - "version": "0.1.1", + "version": "0.1.2", "private": true, "description": "Cube Schema", "main": "validate.js", From 7777e943df43ead285f4e9616375ee522529b4a5 Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 29 Nov 2023 13:03:32 +0100 Subject: [PATCH 19/21] ci: use docker/metadata-action --- .changeset/tiny-trainers-march.md | 5 +++++ .github/workflows/ci.yaml | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .changeset/tiny-trainers-march.md diff --git a/.changeset/tiny-trainers-march.md b/.changeset/tiny-trainers-march.md new file mode 100644 index 0000000..b671178 --- /dev/null +++ b/.changeset/tiny-trainers-march.md @@ -0,0 +1,5 @@ +--- +"cube-link": patch +--- + +Generate Docker tags and labels using docker/metadata-action diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 96860ef..e473cdf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,6 +11,9 @@ jobs: docker: runs-on: ubuntu-latest + env: + DOCKER_IMAGE: ghcr.io/zazuko/cube-link + steps: - name: Checkout uses: actions/checkout@v4 @@ -32,11 +35,16 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Docker meta - uses: zazuko/action-docker-meta@main id: docker_meta + uses: docker/metadata-action@v5 with: - images: ghcr.io/zazuko/cube-link - include-pipeline-id: true + images: "${{ env.DOCKER_IMAGE }}" + tags: | + type=ref,event=branch + type=semver,prefix=v,pattern={{version}} + type=semver,prefix=v,pattern={{major}}.{{minor}} + type=semver,prefix=v,pattern={{major}} + type=sha - name: Build and push Docker images id: docker_build From 86a40d7a3cfb1d6dcc30e8ffb9dd29fff858e8ef Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 29 Nov 2023 13:11:50 +0100 Subject: [PATCH 20/21] ci: use the token to checkout the repo --- .changeset/olive-radios-attend.md | 5 +++++ .github/workflows/release.yaml | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 .changeset/olive-radios-attend.md diff --git a/.changeset/olive-radios-attend.md b/.changeset/olive-radios-attend.md new file mode 100644 index 0000000..5c8e412 --- /dev/null +++ b/.changeset/olive-radios-attend.md @@ -0,0 +1,5 @@ +--- +"cube-link": patch +--- + +In the CI, make sure to pull the Git repository with the token, to make sure it is able to trigger tags GitHub Actions workflows diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 53a98c9..63a0ff8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,8 +12,20 @@ jobs: name: Release runs-on: ubuntu-latest steps: + # This allow GitHub Actions to trigger the jobs for tags if needed + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.GH_APP_ID }} + private_key: ${{ secrets.GH_PRIVATE_KEY }} + - name: Checkout Repo uses: actions/checkout@v4 + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + token: ${{ steps.generate_token.outputs.token }} - name: Setup Node.js uses: actions/setup-node@v3 @@ -23,13 +35,6 @@ jobs: - name: Install Dependencies run: npm ci - - name: Generate token - id: generate_token - uses: tibdex/github-app-token@v1 - with: - app_id: ${{ secrets.GH_APP_ID }} - private_key: ${{ secrets.GH_PRIVATE_KEY }} - - name: Create Release Pull Request or Create a GitHub Release + tag uses: changesets/action@v1 with: From 76352a5b239f4b72957929ea0649ddb803b75f7b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Nov 2023 12:14:49 +0000 Subject: [PATCH 21/21] Version Packages --- .changeset/olive-radios-attend.md | 5 ----- .changeset/tiny-trainers-march.md | 5 ----- CHANGELOG.md | 7 +++++++ package.json | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 .changeset/olive-radios-attend.md delete mode 100644 .changeset/tiny-trainers-march.md diff --git a/.changeset/olive-radios-attend.md b/.changeset/olive-radios-attend.md deleted file mode 100644 index 5c8e412..0000000 --- a/.changeset/olive-radios-attend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"cube-link": patch ---- - -In the CI, make sure to pull the Git repository with the token, to make sure it is able to trigger tags GitHub Actions workflows diff --git a/.changeset/tiny-trainers-march.md b/.changeset/tiny-trainers-march.md deleted file mode 100644 index b671178..0000000 --- a/.changeset/tiny-trainers-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"cube-link": patch ---- - -Generate Docker tags and labels using docker/metadata-action diff --git a/CHANGELOG.md b/CHANGELOG.md index a22e822..85da5e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # cube-link +## 0.1.3 + +### Patch Changes + +- 86a40d7: In the CI, make sure to pull the Git repository with the token, to make sure it is able to trigger tags GitHub Actions workflows +- 7777e94: Generate Docker tags and labels using docker/metadata-action + ## 0.1.2 ### Patch Changes diff --git a/package.json b/package.json index 693a38d..d8f2767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cube-link", - "version": "0.1.2", + "version": "0.1.3", "private": true, "description": "Cube Schema", "main": "validate.js",