Compare commits

..

3 Commits

Author SHA1 Message Date
6081122e88 publish based on tag releases instead of main releases 2024-02-20 23:22:17 -07:00
db18183c94 add typescript dependency 2024-02-20 23:12:18 -07:00
fec8c5e560 basic runner format; write a MAIN function
introduce --verbosity flag rather than mixed logging settings; correct color misnaming to ANSI convention; added sanity-check; simplified hello-world; created FZF_USER_INPUT to replace the confusing FZF_HEAD and FZF_TAIL

swap INFO for DEBUG

v3-to-v4 upgrade docs

bring some much-needed tender love and care to the scwrypts runner

improved i/o handling on the run executable means this is no longer relevant

FINALLY fix the weird cases for zsh/read builtin (particularly around reading one character from tty/pipe/file); also gave a --force-user-input flag in case you want to require user input on a yn prompt

update ZLE plugin so it no more make errors

FZF_(HEAD|TAIL) refactor to FZF_USER_INPUT

plugins/kubectl migration from v3 to v4

plugins/ci migration from v3 to v4

refactor py/lib into python-scwrypts subproject

verbosity is stupid lets call it log-level

fix bug with virtualenv loading

mergedeep to slow so I made my options dict shallow

hokay first iteration of python-dudes is ready

circleci configuration for python builds

npm package for scwrypts

3.9.1

initial build/test steps for nodejs

go

go

ok

ok

fix output

ok

ok

finalize publish steps
2024-02-20 23:08:55 -07:00
4 changed files with 49 additions and 24 deletions

View File

@ -13,32 +13,39 @@ executors:
nodejs: nodejs:
docker: docker:
- image: node:18 - image: node:18
resource_class: small resource_class: medium
jobs: jobs:
python-test: python-test:
executor: python executor: python
working_directory: ./py/lib working_directory: ~/scwrypts/py/lib
steps: steps:
- run: | - checkout:
: \ path: ~/scwrypts
&& pip install -e . \ - run:
&& pytest \ name: pytest
; command: |
: \
&& pip install . .[test] \
&& pytest \
;
python-publish: python-publish:
executor: python executor: python
working_directory: ~/scwrypts/py/lib
steps: steps:
- checkout - checkout:
path: ~/scwrypts
- python/dist - python/dist
- run: pip install twine && twine upload dist/* - run: pip install twine && twine upload dist/*
nodesjs-test: nodejs-test:
executor: nodejs executor: nodejs
working_directory: ./zx/lib working_directory: ~/scwrypts/zx/lib
steps: steps:
- checkout - checkout:
path: ~/scwrypts
- restore_cache: - restore_cache:
name: restore pnpm cache name: restore pnpm cache
@ -61,12 +68,14 @@ jobs:
- run: pnpm test - run: pnpm test
- run: pnpm lint - run: pnpm lint
- run: pnpm build
nodesjs-publish: nodejs-publish:
executor: nodejs executor: nodejs
working_directory: ./zx/lib working_directory: ~/scwrypts/zx/lib
steps: steps:
- checkout - checkout:
path: ~/scwrypts
- restore_cache: - restore_cache:
name: restore pnpm cache name: restore pnpm cache
@ -87,23 +96,38 @@ jobs:
paths: paths:
- .pnpm-store - .pnpm-store
- run: pnpm build - run:
- run: pnpm version $(git describe --tags) name: publish
command: |
: \
&& [ $CIRCLE_TAG ] \
&& pnpm build \
&& pnpm version $(git describe --tags) \
&& pnpm set //registry.npmjs.org/:_authToken=$NPM_TOKEN \
&& pnpm publish --no-git-checks \
;
workflows: workflows:
build: python:
jobs: jobs:
- python-test - python-test
- python-publish: - python-publish:
requires: [python-test] requires: [python-test]
context: [pypi-yage]
filters: filters:
tags:
only: /^v.*$/
branches: branches:
only: main ignore: /^.*$/
nodejs:
jobs:
- nodejs-test - nodejs-test
- nodejs-publish: - nodejs-publish:
requires: [nodejs-test] requires: [nodejs-test]
context: [npm-wrynegade]
filters: filters:
tags:
only: /^v.*$/
branches: branches:
only: main ignore: /^.*$/

View File

@ -26,6 +26,7 @@
"prettier": "^3.2.5", "prettier": "^3.2.5",
"ts-jest": "^29.1.2", "ts-jest": "^29.1.2",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.3.3",
"uuid": "^9.0.1" "uuid": "^9.0.1"
}, },
"eslintConfig": { "eslintConfig": {

3
zx/lib/pnpm-lock.yaml generated
View File

@ -43,6 +43,9 @@ devDependencies:
ts-node: ts-node:
specifier: ^10.9.2 specifier: ^10.9.2
version: 10.9.2(@types/node@20.11.19)(typescript@5.3.3) version: 10.9.2(@types/node@20.11.19)(typescript@5.3.3)
typescript:
specifier: ^5.3.3
version: 5.3.3
uuid: uuid:
specifier: ^9.0.1 specifier: ^9.0.1
version: 9.0.1 version: 9.0.1

View File

@ -64,11 +64,9 @@ afterEach(() => {
}); });
describe('exact lookup', () => { describe('exact lookup', () => {
let output;
beforeEach(async () => { beforeEach(async () => {
sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.exact); sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.exact);
await scwrypts(sample.options);
output = await scwrypts(sample.options);
}); });
test('gets the correct lookup', () => { test('gets the correct lookup', () => {
@ -98,7 +96,6 @@ describe('exact lookup', () => {
describe('patterns lookup', () => { describe('patterns lookup', () => {
beforeEach(async () => { beforeEach(async () => {
sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.patterns); sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.patterns);
await scwrypts(sample.options); await scwrypts(sample.options);
}); });