Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

makecode

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makecode - npm Package Compare versions

Comparing version 0.28.5 to 0.29.0

2

built/bump.d.ts

@@ -19,2 +19,2 @@ /// <reference types="node" />

export declare function monoRepoConfigs(folder: string, includingSelf?: boolean): string[];
export declare function bumpAsync(prj: mkc.Project, versionFile: string, stage: boolean): Promise<void>;
export declare function bumpAsync(prj: mkc.Project, versionFile: string, stage: boolean, release: "patch" | "minor" | "major"): Promise<void>;

@@ -20,2 +20,3 @@ "use strict";

const glob_1 = require("glob");
const semver_1 = require("semver");
function spawnAsync(opts) {

@@ -115,3 +116,14 @@ opts.pipe = false;

exports.monoRepoConfigs = monoRepoConfigs;
function bumpAsync(prj, versionFile, stage) {
function collectCurrentVersion(prj) {
const configs = monoRepoConfigs(prj.directory, true);
let version = "0.0.0";
for (const config of configs) {
const cfg = JSON.parse(fs.readFileSync(config, "utf8"));
const v = (0, semver_1.clean)(cfg.version || "");
if ((0, semver_1.valid)(v) && (0, semver_1.lt)(version, v))
version = v;
}
return version;
}
function bumpAsync(prj, versionFile, stage, release) {
var _a, _b;

@@ -126,9 +138,13 @@ return __awaiter(this, void 0, void 0, function* () {

const cfg = prj.mainPkg.config;
const m = /^(\d+\.\d+)\.(\d+)(.*)/.exec(cfg.version);
let newV = m ? m[1] + "." + (parseInt(m[2]) + 1) + m[3] : "";
newV = yield queryAsync("New version", newV);
const currentVersion = collectCurrentVersion(prj);
let newV = currentVersion;
if (release)
newV = (0, semver_1.inc)(currentVersion, release);
else
newV = yield queryAsync("New version", newV);
const newTag = "v" + newV;
cfg.version = newV;
mkc.log(`new version: ${newV}`);
if (versionFile) {
mkc.log(`writing version ${newV} in ${versionFile}`);
mkc.log(`writing version in ${versionFile}`);
const versionSrc = `

@@ -135,0 +151,0 @@ // Auto-generated file: do not edit.

@@ -467,3 +467,3 @@ "use strict";

const prj = yield resolveProject(opts);
yield bump.bumpAsync(prj, opts === null || opts === void 0 ? void 0 : opts.versionFile, opts === null || opts === void 0 ? void 0 : opts.stage);
yield bump.bumpAsync(prj, opts === null || opts === void 0 ? void 0 : opts.versionFile, opts === null || opts === void 0 ? void 0 : opts.stage, (opts === null || opts === void 0 ? void 0 : opts.major) ? "major" : (opts === null || opts === void 0 ? void 0 : opts.minor) ? "minor" : (opts === null || opts === void 0 ? void 0 : opts.patch) ? "patch" : undefined);
});

@@ -809,2 +809,5 @@ }

.option("--stage", "skip git commit and push operations")
.option("--patch", "auto-increment patch version number")
.option("--minor", "auto-increment minor version number")
.option("--major", "auto-increment major version number")
.action(bumpCommand);

@@ -811,0 +814,0 @@ createCommand("init")

{
"name": "makecode",
"version": "0.28.5",
"version": "0.29.0",
"description": "MakeCode (PXT) - web-cached build tool",

@@ -47,2 +47,3 @@ "keywords": [

"@types/node": "^16.10.3",
"@types/semver": "^7.3.9",
"semantic-release": "^18.0.0",

@@ -56,3 +57,4 @@ "typescript": "^4.4.3"

"node-fetch": "^2.0.0",
"node-watch": "^0.7.2"
"node-watch": "^0.7.2",
"semver": "^7.3.7"
},

@@ -59,0 +61,0 @@ "release": {

@@ -157,2 +157,8 @@ # MKC - command line tool for MakeCode editors

Use ``--major``, ``--minor``, ``--patch`` to automatically increment the version number.
```
mkc bump --patch
```
Adding `--version-file` will make `mkc` write a TypeScript file with the version number.

@@ -159,0 +165,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc