Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(*): fix package lock #963

Merged
merged 8 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@ jobs:
- name: build and publish
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
node ./scripts/bump_version.js ${{ steps.timestamp.outputs.stamp }}
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
npm publish --workspaces --access public --tag=unstable 2>&1
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- name: build and publish
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
node ./scripts/bump_version.js ${{ github.event.release.tag_name }}
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
npm publish --workspaces --access public ${{ steps.tag.outputs.tag }} 2>&1

Expand Down
3,798 changes: 2,334 additions & 1,464 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"name": "concerto",
"description": "Define and introspect data models",
"version": "3.19.10",
"version": "3.19.9",
"private": true,
"scripts": {
"coverage": "node ./scripts/coverage.js \"packages/concerto-*\" && nyc report -t coverage --cwd . --report-dir coverage --reporter=lcov && cat ./coverage/lcov.info",
Expand Down
6 changes: 3 additions & 3 deletions packages/concerto-analysis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@accordproject/concerto-analysis",
"version": "3.19.10",
"version": "3.19.9",
"description": "Analysis of Concerto model files",
"homepage": "https://github.com/accordproject/concerto",
"engines": {
Expand Down Expand Up @@ -31,11 +31,11 @@
"author": "accordproject.org",
"license": "Apache-2.0",
"dependencies": {
"@accordproject/concerto-core": "3.19.10",
"@accordproject/concerto-core": "3.19.6",
"semver": "7.6.3"
},
"devDependencies": {
"@accordproject/concerto-cto": "3.19.10",
"@accordproject/concerto-cto": "3.19.6",
"@types/semver": "7.5.8",
"@typescript-eslint/eslint-plugin": "8.16.0",
"@typescript-eslint/parser": "8.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/concerto-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@accordproject/concerto-core",
"version": "3.19.10",
"version": "3.19.9",
"description": "Core Implementation for the Concerto Modeling Language",
"homepage": "https://github.com/accordproject/concerto",
"engines": {
Expand Down Expand Up @@ -64,9 +64,9 @@
"yargs": "17.7.2"
},
"dependencies": {
"@accordproject/concerto-cto": "3.19.10",
"@accordproject/concerto-cto": "3.19.6",
"@accordproject/concerto-metamodel": "3.10.4",
"@accordproject/concerto-util": "3.19.10",
"@accordproject/concerto-util": "3.19.6",
"dayjs": "1.11.13",
"debug": "4.3.7",
"lorem-ipsum": "2.0.8",
Expand Down
4 changes: 2 additions & 2 deletions packages/concerto-cto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@accordproject/concerto-cto",
"version": "3.19.10",
"version": "3.19.9",
"description": "Parser for Concerto CTO files",
"homepage": "https://github.com/accordproject/concerto",
"engines": {
Expand Down Expand Up @@ -52,7 +52,7 @@
},
"dependencies": {
"@accordproject/concerto-metamodel": "3.10.4",
"@accordproject/concerto-util": "3.19.10"
"@accordproject/concerto-util": "3.19.6"
},
"browserslist": "> 0.25%, not dead",
"nyc": {
Expand Down
9 changes: 4 additions & 5 deletions packages/concerto-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@accordproject/concerto-types",
"version": "3.19.10",
"version": "3.19.9",
"description": "Types for the Concerto Modeling Language",
"homepage": "https://github.com/accordproject/concerto",
"engines": {
Expand Down Expand Up @@ -32,10 +32,9 @@
"author": "accordproject.org",
"license": "Apache-2.0",
"devDependencies": {
"@accordproject/concerto-codegen": "3.30.2",
"@accordproject/concerto-core": "3.19.10",
"@accordproject/concerto-util": "3.19.10",
"ajv-dist": "^8.8.2",
"@accordproject/concerto-codegen": "3.30.1",
"@accordproject/concerto-core": "3.19.6",
"@accordproject/concerto-util": "3.19.6",
"eslint": "8.57.1",
"jest": "29.7.0",
"npm-run-all": "4.1.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/concerto-util/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@accordproject/concerto-util",
"version": "3.19.10",
"version": "3.19.9",
"description": "Utilities for Concerto Modeling Language",
"homepage": "https://github.com/accordproject/concerto",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/concerto-vocabulary/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@accordproject/concerto-vocabulary",
"version": "3.19.10",
"version": "3.19.9",
"description": "Associate human-readable text to model declarations",
"homepage": "https://github.com/accordproject/concerto",
"engines": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"author": "accordproject.org",
"license": "Apache-2.0",
"devDependencies": {
"@accordproject/concerto-core": "3.19.10",
"@accordproject/concerto-core": "3.19.6",
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"chai-things": "0.2.0",
Expand Down
61 changes: 61 additions & 0 deletions scripts/bump_version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env node
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

const fs = require('fs');
const glob = require('glob');

/**
* This script updates the devDependencies and dependencies in the workspaces
* to match the version specified by the given parameter.
* The expected parameter should be the tag for the package.
*
* Example:
* node ./script/bump_version.js <tag>
*/

const workspacesPattern = 'packages/*/package.json'; // Adjust this pattern based on your workspace setup
const packageNames = [
"@accordproject/concerto-analysis",
"@accordproject/concerto-core",
"@accordproject/concerto-cto",
"@accordproject/concerto-types",
"@accordproject/concerto-util",
"@accordproject/concerto-vocabulary"
];

function bumpDependencies() {
const targetPackageVersion = process.argv[2];
const workspacePackages = glob.sync(workspacesPattern);

workspacePackages.forEach((packagePath) => {
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));

['dependencies', 'devDependencies'].forEach((depType) => {
packageNames.forEach(dep => {
if (packageJson[depType] && (dep in packageJson[depType])) {
packageJson[depType][dep] = targetPackageVersion;
}
});
});

fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + '\n', 'utf8');
});

console.log('Dependencies updated successfully!');
}

bumpDependencies();
Loading