- Download the latest zsh package: https://packages.msys2.org/package/zsh?repo=msys&variant=x86_64
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
const fs = require('fs'); | |
const cliArgs = process.argv.slice(2); | |
const key = cliArgs[0]; | |
const val = cliArgs[1]; | |
function parseJSON(string) { | |
const sanitised = string.replace(/\s\$\w*/g, substr => `"__SANITISED__${substr}"`); | |
return JSON.parse(sanitised); | |
} |
// Adapted from https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_transpiler_loader | |
import { readFileSync, writeFileSync } from 'fs' | |
import { dirname } from 'path' | |
import { URL, pathToFileURL, fileURLToPath } from 'url' | |
import esbuild from 'esbuild' | |
const baseURL = pathToFileURL(`${process.cwd()}/`).href | |
const tsExtensionRegex = /\.(tsx?)$/ | |
function readJSON(path) { |
import { RunOptions, RunTarget } from 'github-action-ts-run-api' | |
import assert from 'node:assert' | |
import fs from 'node:fs' | |
import http from 'node:http' | |
async function runTest() { | |
const port = 8234 | |
const server = http | |
.createServer((req, res) => { | |
if (req.url === '/repos/owner/repo') { |
import glob from 'fast-glob' | |
import nodeURL from 'url' | |
import process from 'process' | |
/** Returns pathnames matching the given pattern. */ | |
const sync = (source: string) => glob.sync(source, options()) as string[] | |
/** Returns pathnames matching the given pattern. */ | |
const async = (source: string) => glob(source, options()) as Promise<string[]> |
function isPlainObject(item: unknown): item is Record<string, unknown> { | |
return item && (item as object).constructor === Object | |
} | |
function filterProto([key, value]: [string, unknown]) { | |
// Avoid prototype pollution | |
return key !== '__proto__' | |
} | |
const deepmerge = ( |
// branded types to allow for better type inference | |
// with default generic types | |
/* eslint-disable @typescript-eslint/naming-convention */ | |
type NO_PAYLOAD = { | |
JgJES6BF8uyaOwF1: "FY7eBhPYJlqOxuVp"; | |
}; | |
type OPTIONAL_PAYLOAD = { | |
A7nWdXs0r5RLuHRf: "zPcrRNRIl4r5IHbA"; | |
}; |
import Layout from '../Layouts' | |
import { Fragment } from 'react' | |
const Home: React.FC = () => { | |
return ( | |
<Fragment> | |
<h1>Home</h1> | |
<p>Hello, welcome to your first Inertia app!</p> | |
</Fragment> | |
) |
#!/usr/bin/env node | |
import { readdir, rm } from 'node:fs/promises' | |
/** | |
* @license | |
* MIT License | |
* | |
* Copyright (c) 2023 Jörn Spangenberg <https://jrson.me> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz