Skip to content

Commit

Permalink
[minor] ad fix-ts-bind.script.ts to @augment-vir/node
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed Dec 10, 2024
1 parent 9767015 commit d0d5e51
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 51 deletions.
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/mono-repo-root",
"version": "31.0.1",
"version": "31.1.0",
"private": true,
"homepage": "https://github.com/electrovir/augment-vir",
"bugs": {
Expand All @@ -23,7 +23,7 @@
"compile": "virmator compile",
"docs": "npm run exec --workspace @augment-vir/scripts src/scripts/run-typedoc.script.ts",
"format": "virmator format",
"postinstall": "cd packages/common && tsc -b -f --pretty && cd ../.. && tsx packages/scripts/src/scripts/fix-ts-bin.script.ts",
"postinstall": "cd packages/common && tsc -b -f --pretty && cd ../.. && tsx packages/node/src/scripts/fix-ts-bin.script.ts",
"lint": "virmator lint fix",
"publish": "virmator publish \"npm run test:all\"",
"test": "mono-vir for-each npm run test",
Expand Down
4 changes: 2 additions & 2 deletions packages/assert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/assert",
"version": "31.0.1",
"version": "31.1.0",
"description": "A collection of assertions for test and production code alike.",
"keywords": [
"augment",
Expand Down Expand Up @@ -41,7 +41,7 @@
"test:update": "npm test"
},
"dependencies": {
"@augment-vir/core": "^31.0.1",
"@augment-vir/core": "^31.1.0",
"@date-vir/duration": "^7.0.1",
"deep-eql": "^5.0.2",
"expect-type": "^1.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/common",
"version": "31.0.1",
"version": "31.1.0",
"description": "A collection of augments, helpers types, functions, and classes for any JavaScript environment.",
"keywords": [
"augment",
Expand Down Expand Up @@ -39,8 +39,8 @@
"test:web": "virmator --no-deps test web"
},
"dependencies": {
"@augment-vir/assert": "^31.0.1",
"@augment-vir/core": "^31.0.1",
"@augment-vir/assert": "^31.1.0",
"@augment-vir/core": "^31.1.0",
"@date-vir/duration": "^7.0.1",
"ansi-styles": "^6.2.1",
"json5": "^2.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/core",
"version": "31.0.1",
"version": "31.1.0",
"description": "Core augment-vir augments. Use @augment-vir/common instead.",
"homepage": "https://github.com/electrovir/augment-vir",
"bugs": {
Expand Down
1 change: 0 additions & 1 deletion packages/node/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/cspell.config.cjs
/graphics/
/Icon?
/src/
/www-static/
bash-scripts/
dist-docs/
Expand Down
8 changes: 4 additions & 4 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/node",
"version": "31.0.1",
"version": "31.1.0",
"description": "A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.",
"keywords": [
"augment",
Expand Down Expand Up @@ -37,16 +37,16 @@
"test:update": "npm test"
},
"dependencies": {
"@augment-vir/assert": "^31.0.1",
"@augment-vir/common": "^31.0.1",
"@augment-vir/assert": "^31.1.0",
"@augment-vir/common": "^31.1.0",
"@date-vir/duration": "^7.0.1",
"ansi-styles": "^6.2.1",
"terminate": "^2.8.0",
"type-fest": "^4.29.0",
"typed-event-target": "^4.0.2"
},
"devDependencies": {
"@augment-vir/test": "^31.0.1",
"@augment-vir/test": "^31.1.0",
"@prisma/client": "^5.22.0",
"@types/node": "^22.10.0",
"@web/dev-server-esbuild": "^1.0.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
/* node:coverage disable */

/**
* To use this script properly, call it directly in your postinstall script. Like this:
*
* ```json
* {
* "scripts": {
* "postinstall": "tsx node_modules/@augment-vir/node/src/scripts/fix-ts-bin.script.ts"
* }
* }
* ```
*/

import {log} from '@augment-vir/common';
import {interpolationSafeWindowsPath, runShellCommand} from '@augment-vir/node';
import {rm, writeFile} from 'node:fs/promises';
import {join, sep} from 'node:path/posix';
import {monoRepoNodeModulesDirPath} from '../file-paths.js';

type PackageToFix = {
packageName: string;
Expand Down Expand Up @@ -37,7 +50,7 @@ function createBinFileContents({scriptPath}: Readonly<Pick<PackageToFix, 'script
}

async function fixTsBin(packageToFix: Readonly<PackageToFix>) {
const binFilePath = join(monoRepoNodeModulesDirPath, '.bin', packageToFix.binName);
const binFilePath = join(process.cwd(), 'node_modules', '.bin', packageToFix.binName);
await rm(binFilePath, {force: true});
await writeFile(binFilePath, createBinFileContents(packageToFix));
await runShellCommand(`chmod +x ${interpolationSafeWindowsPath(binFilePath)}`);
Expand Down
10 changes: 5 additions & 5 deletions packages/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/scripts",
"version": "31.0.1",
"version": "31.1.0",
"private": true,
"homepage": "https://github.com/electrovir/augment-vir",
"bugs": {
Expand All @@ -24,15 +24,15 @@
"test:update": "npm test"
},
"dependencies": {
"@augment-vir/assert": "^31.0.1",
"@augment-vir/common": "^31.0.1",
"@augment-vir/node": "^31.0.1",
"@augment-vir/assert": "^31.1.0",
"@augment-vir/common": "^31.1.0",
"@augment-vir/node": "^31.1.0",
"@virmator/docs": "^13.10.3",
"jsdom": "^25.0.1",
"typedoc": "^0.27.0"
},
"devDependencies": {
"@augment-vir/test": "^31.0.1",
"@augment-vir/test": "^31.1.0",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.10.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/test",
"version": "31.0.1",
"version": "31.1.0",
"description": "A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.",
"keywords": [
"test",
Expand Down Expand Up @@ -42,8 +42,8 @@
"test:web": "virmator test --no-deps web 'src/test-web/**/*.test.ts' 'src/augments/universal-testing-suite/**/*.test.ts'"
},
"dependencies": {
"@augment-vir/assert": "^31.0.1",
"@augment-vir/common": "^31.0.1",
"@augment-vir/assert": "^31.1.0",
"@augment-vir/common": "^31.1.0",
"@open-wc/testing-helpers": "^3.0.1",
"@virmator/test": "^13.10.3",
"type-fest": "^4.29.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@augment-vir/web",
"version": "31.0.1",
"version": "31.1.0",
"description": "A collection of augments, helpers types, functions, and classes only for web (frontend) JavaScript environments.",
"keywords": [
"augment",
Expand Down Expand Up @@ -35,14 +35,14 @@
"test:update": "npm test"
},
"dependencies": {
"@augment-vir/assert": "^31.0.1",
"@augment-vir/common": "^31.0.1",
"@augment-vir/assert": "^31.1.0",
"@augment-vir/common": "^31.1.0",
"@date-vir/duration": "^7.0.1",
"html-spec-tags": "^2.2.1",
"type-fest": "^4.29.0"
},
"devDependencies": {
"@augment-vir/test": "^31.0.1",
"@augment-vir/test": "^31.1.0",
"bowser": "^2.11.0",
"typescript": "^5.6.3"
},
Expand Down

0 comments on commit d0d5e51

Please sign in to comment.