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

auri

Package Overview
Dependencies
Maintainers
0
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auri - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

dist/utils/github.js

10

dist/scripts/generate.js
import * as fs from "fs/promises";
import * as childprocess from "child_process";
import { parsePackageJSON } from "../utils/package.js";
import { parseGitHubGitRepositoryURL } from "../utils/github.js";
export async function generateScript() {

@@ -10,2 +11,9 @@ const packageJSONFile = await fs.readFile("package.json");

const packageVersionSafe = metadata.version;
let repository;
try {
repository = parseGitHubGitRepositoryURL(metadata.repository);
}
catch {
throw new Error("Invalid GitHub repository URL");
}
// TODO: Support line breaks in commit messages?

@@ -27,3 +35,3 @@ const output = childprocess

for (let i = 0; i < commitHashes.length; i++) {
changeFile += `${metadata.repository}/commit/${commitHashes[i]}`;
changeFile += `https://github.com/${repository.owner}/${repository.name}/commit/${commitHashes[i]}`;
if (i !== commitHashes.length - 1) {

@@ -30,0 +38,0 @@ changeFile += "\n";

19

dist/scripts/publish.js

@@ -6,2 +6,3 @@ import * as fs from "fs/promises";

import { parseSemver } from "../utils/semver.js";
import { parseGitHubGitRepositoryURL } from "../utils/github.js";
export async function publishScript() {

@@ -28,3 +29,3 @@ const npmToken = env("AURI_NPM_TOKEN");

try {
repository = parseGitHubRepositoryURL(metadata.repository);
repository = parseGitHubGitRepositoryURL(metadata.repository);
}

@@ -148,18 +149,2 @@ catch {

})(ReleaseTag || (ReleaseTag = {}));
function parseGitHubRepositoryURL(url) {
const parsed = new URL(url);
if (parsed.origin !== "https://github.com") {
throw new Error("Invalid GitHub repository URL");
}
const pathnameParts = parsed.pathname.split("/").slice(1);
if (pathnameParts.length < 2) {
throw new Error("Invalid GitHub repository URL");
}
const repository = {
url,
owner: pathnameParts[0],
name: pathnameParts[1]
};
return repository;
}
async function createGitHubRelease(token, repository, branch, version, releaseTag, body) {

@@ -166,0 +151,0 @@ const requestBody = JSON.stringify({

@@ -31,3 +31,8 @@ export function parsePackageJSON(data) {

typeof data.repository.url === "string") {
repository = data.repository.url;
if (data.repository.url.endsWith(".git")) {
repository = data.repository.url;
}
else {
repository = data.repository.url + ".git";
}
}

@@ -34,0 +39,0 @@ else {

{
"name": "auri",
"version": "3.1.0",
"version": "3.1.1",
"description": "Organize package changes and releases",

@@ -23,3 +23,3 @@ "type": "module",

"type": "git",
"url": "https://github.com/pilcrowonpaper/auri",
"url": "https://github.com/pilcrowonpaper/auri.git",
"directory": "/"

@@ -26,0 +26,0 @@ },

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