Skip to content

Commit

Permalink
Update dependencies and move to npm vs yarn (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
hopsoft committed Feb 15, 2024
1 parent bec6b51 commit 8df4575
Show file tree
Hide file tree
Showing 21 changed files with 1,749 additions and 906 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/prettier.yml
Expand Up @@ -14,16 +14,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
version: '16.x'
cache: 'yarn'
version: '20.x'
cache: 'npm'

- name: Yarn install
run: yarn install --frozen-lockfile
- name: NPM Install
run: 'npm install --legacy-peer-deps'

- name: Run Prettier
run: yarn run prettier package.json prettier.config.js bin/build.mjs app/javascript/**/**/**/**/*.js

run: 'npx prettier --check --fail-on-errors .'

30 changes: 11 additions & 19 deletions .github/workflows/standardrb.yml
Expand Up @@ -14,23 +14,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1']
ruby-version: ['3.3']

steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run StandardRB
run: bundle exec standardrb --format progress
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run StandardRB
run: bundle exec standardrb --format progress
31 changes: 12 additions & 19 deletions .github/workflows/tests.yml
Expand Up @@ -14,23 +14,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']
ruby-version: ['3.0', '3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run ruby tests
run: bundle exec rake test
- uses: actions/checkout@v3

- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run Tests
run: 'bundle exec rake test'
15 changes: 8 additions & 7 deletions .gitignore
@@ -1,17 +1,18 @@
*.gem
*.key
*.metafile.json
*~
/.bundle/
/.dir-locals.el
/doc/
/log/*.log
/node_modules
/pkg/
/tmp/
/test/dummy/db/*.sqlite3
/test/dummy/db/*.sqlite3-*
/test/dummy/log/*.log
/test/dummy/public/assets/
/test/dummy/storage/
/test/dummy/tmp/
/test/dummy/public/assets/
*.gem
/node_modules
/tmp/
Gemfile.lock
*.key
*~
/.dir-locals.el
4 changes: 4 additions & 0 deletions .prettierignore
@@ -0,0 +1,4 @@
*.md
*.yml
builds
test/dummy/vendor
9 changes: 8 additions & 1 deletion .standard.yml
@@ -1,3 +1,10 @@
ruby_version: 2.7
format: progress
parallel: true

ignore:
- test/dummy/bin/*
- test/dummy/config/initializers/inspect_helpers.rb
- test/dummy/db/schema.rb

Lint/RescueException:
Enabled: false
26 changes: 14 additions & 12 deletions README.md
Expand Up @@ -4,7 +4,7 @@
</h1>
<p align="center">
<a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-1378-47d299.svg" />
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-574-47d299.svg" />
</a>
<a href="https://codeclimate.com/github/hopsoft/turbo_boost-elements/maintainability">
<img src="https://api.codeclimate.com/v1/badges/7aac6daed3e4032e292e/maintainability" />
Expand Down Expand Up @@ -78,12 +78,12 @@ Pre-built easy to use reactive TurboBoost elements for Rails/Hotwire apps.

## Dependencies

- [ruby](https://www.ruby-lang.org/) `>=2.7.3`
- [rails](https://rubygems.org/gems/rails) `>=6.1`
- [turbo-rails](https://rubygems.org/gems/turbo-rails) `>=1.1`
- [@hotwired/turbo](https://yarnpkg.com/package/@hotwired/turbo) `>=7.2.0`
- [@hotwired/turbo-rails](https://yarnpkg.com/package/@hotwired/turbo-rails) `>=7.2.0`
- [turbo_boost-commands](https://github.com/hopsoft/turbo_boost-commands) `>=0.0.2`
- [ruby](https://www.ruby-lang.org/) `>= 3.0`
- [rails](https://rubygems.org/gems/rails) `>= 6.1`
- [turbo-rails](https://rubygems.org/gems/turbo-rails) `>= 1.1`
- [@hotwired/turbo-rails](https://www.npmjs.com/package/@hotwired/turbo-rails) `>= 7.2`
- [turbo_boost-commands](https://rubygems.org/gems/turbo_boost-commands) `>= 0.1.1`
- [@turbo-boost/commands](https://www.npmjs.com/package/@turbo-boost/commands) `>= 0.1.1`

## Setup

Expand Down Expand Up @@ -195,14 +195,16 @@ TurboBoost.devtools.start()

## Releasing

1. Run `yarn` and `bundle` to pick up the latest
1. Bump version number at `lib/turbo_boost/elements/version.rb`. Pre-release versions use `.preN`
1. Run `npm install` and `bundle` to pick up the latest
1. Update the version number consistently in the following files:
* `lib/turbo_boost/elements/version.rb` - pre-release versions should use `.preN`
* `app/javascript/version.js` - pre-release versions use `-preN`
* `package.json` - pre-release versions use `-preN`
1. Run `bin/standardize`
1. Run `rake build` and `yarn build`
1. Run `rake build` and `npm run build`
1. Commit and push changes to GitHub
1. Run `rake release`
1. Run `yarn publish --no-git-tag-version --access public`
1. Yarn will prompt you for the new version. Pre-release versions use `-preN`
1. Run `npm publish --access public`
1. Commit and push changes to GitHub
1. Create a new release on GitHub ([here](https://github.com/hopsoft/turbo_boost-elements/releases)) and generate the changelog for the stable release for it

Expand Down
1 change: 0 additions & 1 deletion app/assets/builds/@turbo-boost/commands.metafile.json

This file was deleted.

0 comments on commit 8df4575

Please sign in to comment.