Skip to content

Update all dependencies, move to yarn/Webpack and GitHub CI#125

Merged
stefcameron merged 3 commits intomasterfrom
update-deps
Aug 17, 2020
Merged

Update all dependencies, move to yarn/Webpack and GitHub CI#125
stefcameron merged 3 commits intomasterfrom
update-deps

Conversation

@stefcameron
Copy link
Copy Markdown
Member

@stefcameron stefcameron commented Aug 15, 2020

Fixes #124 to put this repo inline with focus-trap-react:

  • update all deps to latest versions
  • move to yarn with yarn.lock
  • use Webpack to build instead of Browserify (see below
    for more details)
  • update Prettier and run on all the source (same rules as
    focus-trap-react)
  • add check for types so that problems like ts: fix TypeScript syntax for allowOutsideClick option #123 don't
    happen again
  • (*) fixes bug in package.json 'main' that wasn't pointing to
    /dist/focus-trap.js (build output)

Because of (*) this should be published as a new major release,
just to be safe, even though there shouldn't be any breaking
changes as a result (famous last words...).

This should also close-out a bunch of the security-related
notices on the repo from Dependabot because of old package
versions with vulnerabilities.

Added Webpack builds and removed some deps:

  • Webpack Dev and Prod builds, mimicing old Browserify builds.
  • Removed Browserify: Webpack replaces.
  • Removed uglify: Webpack takes care of this now.
  • Removed xtend: simple ES6 object merging works fine.

Fixed 2 small bugs:

  • Fixed bug on line 316 of index.js where an NPE would happen
    if the trap was created without userOptions; should be
    config.preventScroll instead since we create config early
    on within the module and use that everywhere instead of
    userOptions.
  • Fixed bug in allow-click-outside demo by disabling ESC: Otherwise,
    the 'activate trap' button state would get out of sync with
    the state of the trap (would remain 'deactivate trap' after
    pressing ESC).

NOTE: Publishing is still done manually from a local repo.
If we move this repo to Changesets later, we can start
doing releases via GitHub Actions like focus-trap-react.

Fixes #124 to put this repo inline with focus-trap-react:

- update all deps to latest versions
- move to yarn with yarn.lock
- use Webpack to build instead of Browserify (see below
  for more details)
- update Prettier and run on all the source (same rules as
  focus-trap-react)
- add check for types so that problems like #123 don't
  happen again
- (*) fixes bug in package.json 'main' that wasn't pointing to
  /dist/focus-trap.js (build output)

Because of (*) this should be published as a new __major__ release,
just to be safe, even though there shouldn't be any breaking
changes as a result (famous last words...).

This should also close-out a bunch of the security-related
notices on the repo from Dependabot because of old package
versions with vulnerabilities.

Added Webpack builds and removed some deps:

- Webpack Dev and Prod builds, mimicing old Browserify builds.
- Removed Browserify: Webpack replaces.
- Removed uglify: Webpack takes care of this now.
- Removed xtend: simple ES6 object merging works fine.

Fixed 2 small bugs:

- Fixed bug on line 316 of index.js where an NPE would happen
  if the trap was created without `userOptions`; should be
  `config.preventScroll` instead since we create `config` early
  on within the module and use that everywhere instead of
  `userOptions`.
- Fixed bug in allow-click-outside demo by disabling ESC: Otherwise,
  the 'activate trap' button state would get out of sync with
  the state of the trap (would remain 'deactivate trap' after
  pressing ESC).

NOTE: Publishing is still done manually from a local repo.
If we move this repo to Changesets later, we can start
doing releases via GitHub Actions like `focus-trap-react`.
@focus-trap focus-trap deleted a comment from changeset-bot bot Aug 15, 2020
Copy link
Copy Markdown

@maraisr maraisr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WoW nice one mate, yeah will do the whole changesets thing. And maybe simplify our build too

@stefcameron
Copy link
Copy Markdown
Member Author

@maraisr

WoW nice one mate, yeah will do the whole changesets thing. And maybe simplify our build too

Thanks! Sounds good. What I did here, I will now do over on tabbable. Then we'll have the whole "family" up to date.

@stefcameron stefcameron merged commit 8a0dc98 into master Aug 17, 2020
@stefcameron stefcameron deleted the update-deps branch August 17, 2020 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refresh all dependencies and move to GH workflow for CI

2 participants