Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: clsm-media/react-aria-menubutton
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: wesgro/react-aria-menubutton-ts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Jun 30, 2024

  1. update deps and build (davidtheclark#1)

    * begins typescripting everything, changing as little as possible about the logic
    
    * kinda working but focus is broken
    
    * prettier everything
    
    * everything working again
    
    * format everything
    wesgro authored Jun 30, 2024
    Copy the full SHA
    46f2e72 View commit details
  2. Copy the full SHA
    cfc793e View commit details
  3. remove old files (davidtheclark#2)

    * remove old files
    
    * use same version of pnpm
    
    * use exact same version
    wesgro authored Jun 30, 2024
    Copy the full SHA
    1f0381c View commit details
  4. build dist i nthe action too

    wesgro authored Jun 30, 2024
    Copy the full SHA
    3d3dfd1 View commit details
  5. fix syntax

    wesgro authored Jun 30, 2024
    Copy the full SHA
    eda6e7e View commit details

Commits on Jul 1, 2024

  1. fix up exports and version

    wesgro authored Jul 1, 2024
    Copy the full SHA
    f9ae72d View commit details
  2. fix package json

    wesgro authored Jul 1, 2024
    Copy the full SHA
    b7b8b64 View commit details
  3. Copy the full SHA
    880f259 View commit details
  4. Copy the full SHA
    4112ce3 View commit details
  5. remove unused import

    wesgro authored Jul 1, 2024
    Copy the full SHA
    c121729 View commit details
  6. remove console log

    wesgro authored Jul 1, 2024
    Copy the full SHA
    633c21b View commit details

Commits on Jul 8, 2024

  1. removes teeny-tap dependency and adds more tests (davidtheclark#4)

    * removes teeny-tap dependency and adds more tests
    
    * replaces ref with state in menu event listeners so it can deal with unmounting the component as well
    
    * updates lock file
    wesgro authored Jul 8, 2024
    Copy the full SHA
    cc7baad View commit details
  2. Copy the full SHA
    e488962 View commit details

Commits on Jul 11, 2024

  1. Copy the full SHA
    f9567b3 View commit details
  2. adds scope to name

    wesgro committed Jul 11, 2024
    Copy the full SHA
    25ad99a View commit details
  3. fix missed tabs

    wesgro committed Jul 11, 2024
    Copy the full SHA
    2894273 View commit details
  4. Copy the full SHA
    ba9bb13 View commit details
  5. Copy the full SHA
    fd85c8f View commit details
  6. chore: release v0.0.2-beta.0

    GitHub Actions committed Jul 11, 2024
    Copy the full SHA
    ac874ae View commit details

Commits on Jul 14, 2024

  1. Copy the full SHA
    ab13fd6 View commit details
  2. format

    wesgro committed Jul 14, 2024
    Copy the full SHA
    c60774e View commit details
  3. chore: release v0.0.2-beta.1

    GitHub Actions committed Jul 14, 2024
    Copy the full SHA
    f0eaf38 View commit details
  4. feat: adds demo to gh pages

    wesgro committed Jul 14, 2024
    Copy the full SHA
    9be34c7 View commit details
  5. fix gh pages

    wesgro authored Jul 14, 2024
    Copy the full SHA
    c35bc37 View commit details

Commits on Jul 31, 2024

  1. Update README.md

    wesgro authored Jul 31, 2024
    Copy the full SHA
    38b9ef4 View commit details
  2. Update README.md

    wesgro authored Jul 31, 2024
    Copy the full SHA
    e506308 View commit details
  3. Update index.html

    wesgro authored Jul 31, 2024
    Copy the full SHA
    bb6eb49 View commit details

Commits on Aug 1, 2024

  1. fixes events not being properly forwarded on Button and MenuItem

    …components
    
    also fixes `wrapper` not correctly passing `id` to the element
    wesgro committed Aug 1, 2024
    Copy the full SHA
    4c8892c View commit details
  2. remove console log

    wesgro committed Aug 1, 2024
    Copy the full SHA
    adb660b View commit details
  3. chore: release v0.0.2-beta.2

    GitHub Actions committed Aug 1, 2024
    Copy the full SHA
    bfcf578 View commit details

Commits on Aug 2, 2024

  1. Copy the full SHA
    f9dab63 View commit details
  2. chore: release v0.0.2-beta.3

    GitHub Actions committed Aug 2, 2024
    Copy the full SHA
    67b8157 View commit details
Showing with 6,598 additions and 13,234 deletions.
  1. +1 −0 .eslintignore
  2. +0 −19 .eslintrc
  3. +33 −0 .eslintrc.cjs
  4. +44 −16 .github/workflows/build.yml
  5. +74 −0 .github/workflows/deploy-pages.yml
  6. +98 −0 .github/workflows/release.yml
  7. +50 −0 .github/workflows/test.yml
  8. +1 −1 .npmignore
  9. 0 .prettierrc
  10. +9 −176 CHANGELOG.md
  11. +176 −0 CHANGELOG_OLD.md
  12. +17 −16 README.md
  13. +0 −1 demo/demo-bundle.js.map
  14. +7 −2 demo/js/{basicDemo.js → basicDemo.jsx}
  15. +6 −2 demo/js/{fancyDemo.js → fancyDemo.jsx}
  16. 0 demo/js/{index.js → index.jsx}
  17. +10 −10 {demo → }/index.html
  18. +0 −11,445 package-lock.json
  19. +61 −78 package.json
  20. +4,508 −0 pnpm-lock.yaml
  21. 0 {demo → public}/svg/bowling.svg
  22. 0 {demo → public}/svg/profile-female.svg
  23. 0 {demo → public}/svg/science.svg
  24. 0 {demo → public}/svg/scooting.svg
  25. +0 −129 src/Button.js
  26. +151 −0 src/Button.tsx
  27. +0 −5 src/ManagerContext.js
  28. +12 −0 src/ManagerContext.tsx
  29. +0 −118 src/Menu.js
  30. +331 −0 src/Menu.test.tsx
  31. +142 −0 src/Menu.tsx
  32. +0 −84 src/MenuItem.js
  33. +106 −0 src/MenuItem.tsx
  34. +0 −62 src/Wrapper.js
  35. +111 −0 src/Wrapper.tsx
  36. +0 −169 src/__tests__/Button.test.js
  37. +0 −130 src/__tests__/Menu.test.js
  38. +0 −106 src/__tests__/MenuItem.test.js
  39. +0 −41 src/__tests__/__snapshots__/Button.test.js.snap
  40. +0 −54 src/__tests__/__snapshots__/Menu.test.js.snap
  41. +0 −37 src/__tests__/__snapshots__/MenuItem.test.js.snap
  42. +0 −192 src/__tests__/createManager.test.js
  43. +0 −24 src/__tests__/helpers/MockWrapper.js
  44. +0 −7 src/__tests__/helpers/createMockKeyEvent.js
  45. +0 −22 src/__tests__/helpers/createMockManager.js
  46. +0 −5 src/__tests__/helpers/jest-setup.js
  47. +0 −3 src/__tests__/helpers/raf.js
  48. +221 −0 src/createManage.test.ts
  49. +0 −173 src/createManager.js
  50. +225 −0 src/createManager.ts
  51. +0 −31 src/externalStateControl.js
  52. +26 −0 src/externalStateControl.ts
  53. +48 −0 src/focus-group.d.ts
  54. +12 −0 src/hooks.ts
  55. +0 −10 src/index.js
  56. +10 −0 src/index.ts
  57. +0 −8 src/propTypes.js
  58. +0 −9 src/specialAssign.js
  59. +59 −0 src/types.ts
  60. +20 −0 tsconfig.json
  61. +12 −0 tsup.config.ts
  62. +12 −0 vite.config.ts
  63. +5 −0 vitest-setup.ts
  64. +0 −14 webpack-demo.config.js
  65. +0 −35 webpack-umd.config.js
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
demo
umd
src-old
19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

33 changes: 33 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
"root": true,
env: {
browser: true,
es2021: true,
node: true,
},
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaFeatures: {
jsx: true,
},
sourceType: "module",
ecmaVersion: "2020",
},
ignorePatterns: ["dist/*", "node_modules/*"],
plugins: ["@typescript-eslint"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react/recommended", "plugin:react/jsx-runtime", "plugin:react-hooks/recommended"],
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
},
};
60 changes: 44 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -5,27 +5,55 @@ name: Build

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm test
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.5.0
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm run lint

- name: Typecheck
run: pnpm run typecheck

- name: Typecheck package
run: pnpm run typecheck:package

- name: Build dist
run: pnpm run build
74 changes: 74 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.5.0
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build demo
run: pnpm run build:demo

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: './dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
98 changes: 98 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Release package
on:
workflow_dispatch:
inputs:
release-type:
type: choice
description: 'Release type (one of): patch, minor, major, prepatch, preminor, premajor, prerelease'
required: true
default: prerelease
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
- prerelease
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.5.0
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 20
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

# Configure Git
- name: Git configuration
run: |
git config --global user.email "wesgro+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
# Bump package version
# Use tag latest
- name: Bump release version
if: startsWith(github.event.inputs.release-type, 'pre') != true
run: |
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}

# Bump package pre-release version
# Use tag beta for pre-release versions
- name: Bump pre-release version
if: startsWith(github.event.inputs.release-type, 'pre')
run: |
echo "NEW_VERSION=$(npm --no-git-tag-version --preid=beta version $RELEASE_TYPE)" >> $GITHUB_ENV
echo "RELEASE_TAG=beta" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}

# Commit changes
- name: Commit package.json changes and create tag
run: |
git add "package.json"
git commit -m "chore: release ${{ env.NEW_VERSION }}"
git tag ${{ env.NEW_VERSION }}
# Publish version to public repository
- name: Publish
run: npm publish --verbose --access public --tag ${{ env.RELEASE_TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# Push repository changes
- name: Push changes to repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin && git push --tags
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:

runs-on: ubuntu-latest

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

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.5.0
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Test
run: pnpm run test
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
demo/
test/
.*
src/
Empty file added .prettierrc
Empty file.
Loading