Skip to content
Merged
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
53 changes: 53 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "React Native Toolbox",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"installOhMyZshConfig": true,
"upgradePackages": true,
"username": "node",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
"plugins": "git npm",
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions",
"username": "node"
},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/joshuanianji/devcontainer-features/mount-pnpm-store:1": {}
},

// Volumes to mount
"mounts": [
"source=${devcontainerId}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo chown node node_modules; pnpm install",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "node"
}
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

11 changes: 3 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"extends": [
"oclif",
"oclif-typescript"
],
"rules": {
"unicorn/import-style": "warn"
}
}
"extends": ["oclif", "oclif-typescript", "prettier"],
"ignores": ["/dist"]
}
28 changes: 16 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
version: 2
updates:
- package-ecosystem: "npm"
versioning-strategy: increase
directory: "/"
- package-ecosystem: 'devcontainers'
directory: '/'
schedule:
interval: "monthly"
labels:
- "dependencies"
open-pull-requests-limit: 100
pull-request-branch-name:
separator: "-"
interval: monthly
reviewers:
- 'panz3r'

- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: weekly
day: tuesday
reviewers:
- 'panz3r'
ignore:
- dependency-name: "fs-extra"
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- dependency-name: 'fs-extra'
- dependency-name: '*'
update-types: ['version-update:semver-major']
40 changes: 40 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build & Test

on:
push:
branches-ignore: [main]
workflow_dispatch:

jobs:
build:
name: Build & Test

strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
node_version: [lts/-1, lts/*, latest]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: pnpm

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build CLI
run: pnpm run build

- name: Test CLI commands
run: pnpm run test
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release

on:
push:
branches:
- main

jobs:
release-please:
name: Run Release Please

runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

outputs:
releases_created: ${{ steps.release.outputs.releases_created }}

steps:
- name: Run release-please command
id: release
uses: googleapis/release-please-action@v4

build-and-publish:
name: Build & Publish

runs-on: ubuntu-latest

needs: [release-please]

if: needs.release-please.outputs.releases_created != 'false'

concurrency: publish-group # optional: ensure only one action runs at a time

permissions:
contents: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: latest
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build CLI
run: pnpm build

- name: Prepare package
run: pnpm prepack

- name: Publish package
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Cleanup
run: pnpm run postpack
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ $RECYCLE.BIN/
*-debug.log
*-error.log
/.nyc_output
**/.DS_Store
/.idea
/dist
/lib
/package-lock.json
/tmp
node_modules
/node_modules
oclif.manifest.json

# Test-generated resources
Expand Down
7 changes: 5 additions & 2 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"require": [
"test/helpers/init.js",
"ts-node/register"
],
"watch-extensions": [
"ts"
],
"recursive": true,
"reporter": "spec",
"timeout": 60000
"timeout": 60000,
"node-option": [
"loader=ts-node/esm",
"experimental-specifier-resolution=node"
]
}
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@oclif/prettier-config"
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".":"3.0.0"}
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
"skipFiles": ["<node_internals>/**"]
},
{
"type": "node",
"request": "launch",
"name": "Execute Command",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "node",
"runtimeArgs": ["--loader", "ts-node/esm", "--no-warnings=ExperimentalWarning"],
"program": "${workspaceFolder}/bin/dev.js",
"args": ["hello", "world"]
}
]
}
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Here are some resources to help you get started with open source contributions:

We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.

### Report bugs using GitHub's [issues](https://github.com/Forward-Software/react-native-toolbox/issues)
### Report bugs using GitHub's [issues](https://github.com/forwardsoftware/react-native-toolbox/issues)

Report a bug by [opening a new issue](https://github.com/Forward-Software/react-native-toolbox/issues/new/choose)
Report a bug by [opening a new issue](https://github.com/forwardsoftware/react-native-toolbox/issues/new/choose)

#### Write bug reports with detail, background, and sample code

Expand Down Expand Up @@ -58,13 +58,13 @@ We actively welcome your pull requests:
#### Use a consistent Coding Style

This project uses [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/) to maintain a unified coding style.
Before committing your changes remember to run `yarn lint` and check possible warnings and errors.
Before committing your changes remember to run `pnpm lint` and check possible warnings and errors.

#### Any contributions you make will be under the MIT Software License
#### Any contributions you make will be under the Mozilla Public License (version 2.0)

In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project.
In short, when you submit code changes, your submissions are understood to be under the same [Mozilla Public License Version 2.0](http://choosealicense.com/licenses/mpl-2.0/) that covers the project.
Feel free to contact the maintainers if that's a concern.

## License

By contributing, you agree that your contributions will be licensed under its [MIT License](LICENSE).
By contributing, you agree that your contributions will be licensed under its [Mozilla Public License Version 2.0](LICENSE).
Loading