Skip to content

Commit

Permalink
replaced [bun > yarn]
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkhoeri committed Jan 29, 2025
1 parent 578fe80 commit 0bd57cd
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bun install"
"postCreateCommand": "yarn install"

// Configure tool-specific properties.
// "customizations": {},
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: bun install
- run: bun add typescript@${{ matrix.typescript }}
- run: bun run build
- run: bun test
- run: yarn install
- run: yarn add typescript@${{ matrix.typescript }}
- run: yarn run build
- run: yarn test

test-deno:
runs-on: ubuntu-latest
Expand All @@ -40,8 +40,8 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- run: bun install
- run: bun build:deno
- run: yarn install
- run: yarn build:deno
- run: deno --version
- run: deno test
working-directory: ./deno/lib
Expand All @@ -65,6 +65,6 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: bun install
- run: bun prettier:check
- run: bun lint:check
- run: yarn install
- run: yarn prettier:check
- run: yarn lint:check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ dist

/__buildtest__

/script/**/*.js

bun.lockb

.log
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.25] - 2025-01-29

### Changed

Migrated from `bun` to `yarn`. Now, all command processes use `yarn` instead of `bun`.

## [0.0.2] - 2025-01-29

### Added
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ The following steps will get you setup to contribute changes to this repo:

2. Clone your forked repo: `git clone git@github.com:{your_username}/cretex.git`

3. Run `bun install` to install dependencies.
3. Run `yarn` to install dependencies.

4. Start playing with the code! You can do some simple experimentation in [`playground.ts`](playground.ts) (see `bun play` below) or start implementing a feature right away.
4. Start playing with the code! You can do some simple experimentation in [`playground.ts`](playground.ts) (see `yarn play` below) or start implementing a feature right away.

## Alternative: VSCode Dev Container setup

Expand All @@ -35,23 +35,23 @@ In the OSS version of VSCode the extension may be not available.

### Commands

**`bun run build`**
**`yarn build`**

- deletes `lib` and re-compiles `src` to `lib`

**`bun test`**
**`yarn test`**

- runs all Jest tests and generates coverage badge

**`bun play`**
**`yarn play`**

- executes [`playground.ts`](playground.ts), watches for changes. useful for experimentation

### Tests

cretex uses Jest for testing. After implementing your contribution, write tests for it. Just create a new file under `__tests__` or add additional tests to the appropriate existing file.

Before submitting your PR, run `bun test` to make sure there are no (unintended) breaking changes.
Before submitting your PR, run `yarn test` to make sure there are no (unintended) breaking changes.

### Documentation

Expand Down
4 changes: 2 additions & 2 deletions configs/deno-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ writeFileSync(join(denoLibRoot, 'mod.ts'), `export * from "./index.ts";\nexport
encoding: 'utf-8'
});

// **Tulis file deno.json**
// **Write deno.json file**
const denoJsonContent = JSON.stringify({
name: "@cretex/dynamic",
version: packageVersion,
Expand All @@ -101,7 +101,7 @@ const denoJsonContent = JSON.stringify({

writeFileSync(join(denoLibRoot, 'deno.json'), denoJsonContent, { encoding: 'utf-8' });

// **Salin file LICENSE ke deno/lib/**
// **cp LICENSE to ./deno/lib**
const licensePath = join(projectRoot, 'LICENSE');
const licenseDest = join(denoLibRoot, 'LICENSE');

Expand Down
4 changes: 2 additions & 2 deletions deno/lib/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cretex/dynamic",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"exports": "./mod.ts"
}
}
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cretex",
"version": "0.0.2",
"version": "0.0.3",
"author": "Ilham Khoeri <ilkhoeri@gmail.com> (https://github.com/ilkhoeri)",
"repository": {
"type": "git",
Expand Down Expand Up @@ -102,28 +102,28 @@
"scripts": {
"prettier:check": "prettier --check src deno *.md --no-error-on-unmatched-pattern",
"prettier:fix": "prettier --write src deno *.md --ignore-unknown --no-error-on-unmatched-pattern",
"prettier": "bun run prettier:check && bun run prettier:fix",
"prettier": "yarn prettier:check && yarn prettier:fix",
"lint:check": "eslint --cache src",
"lint:fix": "eslint --cache --fix src",
"check": "bun lint:check && bun prettier:check",
"fix": "bun lint:fix && bun prettier:fix",
"check": "yarn lint:check && yarn prettier:check",
"fix": "yarn lint:fix && yarn prettier:fix",
"clean": "rm -rf lib/* deno/lib/*",
"build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:deno",
"build:deno": "bun run ./script/info.ts deno && node ./configs/deno-build.mjs && cp ./README.md ./deno/lib",
"build:esm": "bun run ./script/info.ts esm && rollup --config ./configs/rollup.config.mjs --compact",
"build:cjs": "bun run ./script/info.ts cjs && tsc -p ./configs/tsconfig.cjs.json",
"build": "yarn clean && yarn build:cjs && yarn build:esm && yarn build:deno",
"build:deno": "tsx ./script/info.ts deno && node ./configs/deno-build.mjs && cp ./README.md ./deno/lib",
"build:esm": "tsx ./script/info.ts esm && rollup --config ./configs/rollup.config.mjs --compact",
"build:cjs": "tsx ./script/info.ts cjs && tsc -p ./configs/tsconfig.cjs.json",
"build:types": "tsc -p ./configs/tsconfig.types.json",
"build:test": "tsc -p ./configs/tsconfig.test.json",
"test:watch": "bun test:ts-jest --watch",
"test": "bun test:ts-jest",
"test:watch": "yarn test:ts-jest --watch",
"test": "yarn test:babel && yarn test:jest && yarn test:ts-jest && yarn test:swc && yarn test:bun && yarn test:vitest && yarn test:deno",
"test:babel": "jest --coverage --config ./configs/babel-jest.config.json",
"test:bun": "bun test __tests__/",
"test:vitest": "npx vitest --config ./configs/vitest.config.ts",
"test:ts-jest": "npx jest --config ./configs/ts-jest.config.json",
"test:jest": "jest --coverage",
"test:swc": "npx jest --config ./configs/swc-jest.config.json",
"test:deno": "cd deno && deno test",
"prepare:test": "husky .husky/pre-publish \"bun test\"",
"prepare:test": "husky .husky/pre-publish \"yarn test\"",
"prepare": "husky",
"jsr:publish": "cd deno/lib && npx jsr publish",
"lint": "eslint src --cache",
Expand Down

0 comments on commit 0bd57cd

Please # to comment.