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

v8 #495

Open
wants to merge 19 commits into
base: v7
Choose a base branch
from
Open

v8 #495

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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ tmp/*
package-lock.json
.vscode
/dist
/bin
/bin
17 changes: 9 additions & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
printWidth: 100
tabWidth: 4
useTabs: true
bracketSpacing: false
trailingComma: es5
singleQuote: true
arrowParens: "avoid"

{
"printWidth": 100,
"tabWidth": 4,
"useTabs": true,
"bracketSpacing": false,
"trailingComma": "es5",
"singleQuote": true,
"arrowParens": "avoid"
}
253 changes: 129 additions & 124 deletions README.md

Large diffs are not rendered by default.

Binary file added bun.lockb
Binary file not shown.
2 changes: 0 additions & 2 deletions legacy/.gitignore

This file was deleted.

39 changes: 0 additions & 39 deletions legacy/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions legacy/package.json

This file was deleted.

58 changes: 0 additions & 58 deletions legacy/rreplace.js

This file was deleted.

9 changes: 0 additions & 9 deletions legacy/test.sh

This file was deleted.

54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
{
"name": "rexreplace",
"version": "7.1.4",
"description": "Smooth search & replace across files from the CLI | 🔎 🔃 📄",
"version": "8.0.0-dev",
"description": "Search & replace across files with a CLI tool that makes you trust what you are doing.",
"author": "Mathias Rangel Wulff",
"license": "MIT",
"type": "module",
"main": "src/engine.js",
"repository": {
"type": "git",
"url": "git+https://github.com/mathiasrw/rexreplace.git"
},
"bin": {
"rr": "bin/rexreplace.cli.js",
"rexreplace": "bin/rexreplace.cli.js"
"rr": "src/env/bun.ts",
"rexreplace_node": "bin/rexreplace.cli.js",
"rexreplace": "src/env/bun.ts"
},
"scripts": {
"test": "yarn build && yarn test-cli && yarn test-js",
"postbuild": "cp bin/rexreplace.cli.js bin/rexreplace.cli.min.js",
"version": "yarn build-minify",
"build": "yarn build-only",
"build-only": "tsc src/cli --outDir bin/ES6 -t ES6 && rollup -c",
"build-minify": "yarn build && yarn minify",
"minify": "# echo '#!/usr/bin/env node' > bin/rexreplace.cli.min.js && npx google-closure-compiler --js=bin/rexreplace.cli.js >> bin/rexreplace.cli.min.js",
"prebuild": "rm -fr bin && yarn format",
"postbuild": "npx rexreplace@7 '^(#!.+\\n)?' '$1import { createRequire as createImportMetaRequire } from 'module'; import.meta.require ||= (id) => createImportMetaRequire(import.meta.url)(id);\\n' -GM bin/rexreplace.cli.js && cp bin/rexreplace.cli.js bin/rexreplace.cli.min.js",
"build-only": "swc src/ -d dist/ && bun build --target node src/env/node.ts --outfile bin/rexreplace.cli.js ",
"build-minify": "bun build --target node src/env/node.ts --outfile bin/rexreplace.cli.min.js --minify",
"prebuild": "rm -fr bin dist # && yarn format",
"test-js": "echo todo: async mocha",
"test-minify": "yarn build-minify && yarn test-cli && yarn test-js",
"test-cli": "npm uninstall -g rexreplace && npm -g install ./ && yarn test-cli-only",
"test-cli": "(true || (npm uninstall -g rexreplace && npm -g install ./)) && yarn test-cli-only",
"test-cli-only": "bash test/cli/run.sh",
"test-speed": "bash test/speed/run.sh",
"prepublishOnly": "yarn is-git-clean && git fetch && git rebase origin/main && yarn test-minify && yarn load-options && yarn bump",
"postpublish": "git push --tag && git push && (open https://github.com/mathiasrw/rexreplace/releases || 1)",
"load-options": "rr -h | rr 'Options:(.+)Examples:' _ -ms | rr '\\n {26,}|\\n\\n *' ' ' | rr \"'\" '`' | rr '^ (-.+?), (--[^ ]+) *' '`€1` | **`€2`** ' | rr '(^---- . ----).+?(## Good to know)' '€1 + nl + pipe + nl + nl + €2' readme.md -jsT",
"load-options": "rr -h | rr 'Options:(.+)Examples:' _ -ms | rr '§n {26,}|§n§n *' ' ' | rr \"'\" '`' | rr '^ (-.+?), (--[^ ]+) *' '`€1` | **`€2`** ' | rr '(^---- . ----).+?(## Good to know)' '€1 + nl + pipe + nl + nl + €2' readme.md -jsT",
"test-format": "yarn prettier --list-different || (echo 'Please correct file formatting using `yarn format` and try again.' && exit 1)",
"format": "yarn prettier --write",
"prettier": "prettier '{src,test}/**/*.{scss,css,js,ts}'",
Expand All @@ -46,22 +47,19 @@
"sed"
],
"devDependencies": {
"@rollup/plugin-commonjs": "26.0.1",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-replace": "5.0.7",
"@rollup/plugin-swc": "^0.3.1",
"@swc/core": "^1.7.11",
"@types/node": "20.8.3",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.90",
"@types/node": "^20.6.2",
"@types/yargs": "^17.0.24",
"assert": "^2.0.0",
"mocha": "10.7.3",
"prettier": "3.3.3",
"rollup": "2.79.1",
"rollup-plugin-closure-compiler-js": "^1.0.6",
"rollup-plugin-progress": "1.1.2",
"rollup-plugin-typescript3": "3.0.5",
"typescript": "5.5.4",
"bun-types": "^1.0.2",
"magic-string": "0.30.3",
"mocha": "10.2.0",
"prettier": "3.0.3",
"ts-node": "^10.9.1",
"typescript": "5.2.2",
"version-bump-prompt": "6.1.0",
"yarn": "1.22.22"
"yarn": "1.22.19"
},
"resolutions": {
"ansi-regex": "6",
Expand All @@ -72,9 +70,11 @@
"test": "test"
},
"dependencies": {
"argmate": "^0.6.0",
"chalk": "^5.3.0",
"fast-glob": "^3.3.1",
"fs-extra": "^11.1.1",
"globs": "0.1.4",
"yargs": "16.2.0"
"globs": "0.1.4"
},
"prettier": {
"useTabs": true,
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import resolve from '@rollup/plugin-node-resolve';
export default [
{
// input: 'src/cli.ts',
input: 'bin/ES6/cli.js',
input: 'bin/ES6/env/node.js',
output: {
name: 'rexreplace',
file: 'bin/rexreplace.cli.js',
Expand Down
Loading