Skip to content

Commit

Permalink
Merge pull request #212 from trafficonese/develop
Browse files Browse the repository at this point in the history
Update JS-dependencies
  • Loading branch information
trafficonese authored Apr 1, 2024
2 parents 5896d32 + 7729029 commit ebb7bcb
Show file tree
Hide file tree
Showing 492 changed files with 34,538 additions and 28,176 deletions.
17 changes: 10 additions & 7 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@
^inst/examples/.*\.Rmd
^inst/examples/.*\.html
^inst/examples/rsconnect
^inst/htmlwidgets/bindings
^inst/htmlwidgets/src
^cran-comments\.md$
^README\.md$
^README\.Rmd$
^\.travis\.yml$
^appveyor\.yml$
^\_pkgdown\.yaml$
^docs$
^inst/examples/virginia.rds$
^CONDUCT\.md$
^CODE_OF_CONDUCT\.md$
^node_modules
^package.*\.json
^revdep
^viztest
^private
^\.lintr$
^scripts
^webpack\.config\.js
^inst/htmlwidgets/bindings
^inst/htmlwidgets/src
^.eslintrc\.js$
^\.github$
^\_pkgdown\.yaml$
^_pkgdown\.yml$
^pkgdown$
^codecov\.yml$
40 changes: 40 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
parserOptions: {
'ecmaVersion': 6,
'sourceType': 'module'
},
env: {
browser: true,
node: true,
},
extends: 'eslint:recommended',
plugins: [
'@stylistic/js'
],
rules: {
'indent': ['error', 2],
'@stylistic/js/array-bracket-spacing': ['error', 'never'],
'@stylistic/js/arrow-spacing': 'error',
'@stylistic/js/comma-spacing': ['error', { 'before': false, 'after': true }],
'@stylistic/js/comma-style': ['error', 'last'],
'@stylistic/js/multiline-ternary': ['error', 'always'],
'@stylistic/js/eol-last': ['error', 'always'],
'@stylistic/js/function-paren-newline': ['error', 'never'],
'@stylistic/js/space-infix-ops': 'error',
'@stylistic/js/key-spacing': ['error', { 'beforeColon': false, 'afterColon': true}],
'@stylistic/js/lines-around-comment': ['error', { 'beforeBlockComment': true }],
'@stylistic/js/function-call-spacing': ['error', 'never'],
'@stylistic/js/no-floating-decimal': 'error',
'@stylistic/js/no-multi-spaces': 'error',
'@stylistic/js/space-before-blocks': 'error',
'@stylistic/js/keyword-spacing': ['error', { 'before': true, 'after': true }],
'linebreak-style': 'off',
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'no-unused-vars': ['error', {'args': 'none'}],
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-var': 'off',
'prefer-const': 'error',
'no-assign-const': 'off'
}
};
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2

updates:
# Keep dependencies for GitHub Actions up-to-date
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
51 changes: 51 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Workflow derived from https:/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https:/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
25 changes: 25 additions & 0 deletions .github/workflows/npm_run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Workflow derived from https:/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https:/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]

name: Node.js CI

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npx napa
- run: npm run build --if-present
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow derived from https:/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https:/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
79 changes: 79 additions & 0 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Workflow derived from https:/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https:/r-lib/actions#where-to-find-help
on:
issue_comment:
types: [created]

name: Commands

jobs:
document:
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
name: document
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: pr-document

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add man/\* NAMESPACE
git commit -m 'Document'
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

style:
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
name: style
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: r-lib/actions/setup-r@v2

- name: Install dependencies
run: install.packages("styler")
shell: Rscript {0}

- name: Style
run: styler::style_pkg()
shell: Rscript {0}

- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add \*.R
git commit -m 'Style'
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
77 changes: 77 additions & 0 deletions .github/workflows/styler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Workflow derived from https:/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https:/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]

name: Style

jobs:
style:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::styler, any::roxygen2
needs: styler

- name: Enable styler cache
run: styler::cache_activate()
shell: Rscript {0}

- name: Determine cache location
id: styler-location
run: |
cat(
"location=",
styler::cache_info(format = "tabular")$location,
"\n",
file = Sys.getenv("GITHUB_OUTPUT"),
append = TRUE,
sep = ""
)
shell: Rscript {0}

- name: Cache styler
uses: actions/cache@v4
with:
path: ${{ steps.styler-location.outputs.location }}
key: ${{ runner.os }}-styler-${{ github.sha }}
restore-keys: |
${{ runner.os }}-styler-
${{ runner.os }}-
- name: Style
run: styler::style_pkg()
shell: Rscript {0}

- name: Commit and push changes
run: |
if FILES_TO_COMMIT=($(git diff-index --name-only ${{ github.sha }} \
| egrep --ignore-case '\.(R|[qR]md|Rmarkdown|Rnw|Rprofile)$'))
then
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${FILES_TO_COMMIT[*]} -m "Style code (GHA)"
git pull --ff-only
git push origin
else
echo "No changes to commit."
fi
Loading

0 comments on commit ebb7bcb

Please sign in to comment.