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: kriasoft/universal-router
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.0.0
Choose a base ref
...
head repository: kriasoft/universal-router
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.3.0
Choose a head ref

Commits on Mar 7, 2018

  1. Copy the full SHA
    81b5348 View commit details

Commits on Apr 6, 2018

  1. Update dev dependencies

    frenzzy committed Apr 6, 2018
    Copy the full SHA
    9988f39 View commit details

Commits on Aug 20, 2018

  1. Update dependencies

    frenzzy committed Aug 20, 2018
    Copy the full SHA
    2d6eaa4 View commit details

Commits on Aug 21, 2018

  1. Object assign → spread

    frenzzy committed Aug 21, 2018
    Copy the full SHA
    a81b528 View commit details

Commits on Aug 28, 2018

  1. Babel 7

    frenzzy committed Aug 28, 2018
    Copy the full SHA
    494bddd View commit details

Commits on Oct 5, 2018

  1. Update dev dependencies

    frenzzy committed Oct 5, 2018
    Copy the full SHA
    b5f7dbf View commit details

Commits on Oct 11, 2018

  1. Error handler with context (#158)

    * Error handler with context
    
    * error.status
    frenzzy authored Oct 11, 2018
    Copy the full SHA
    04ffb79 View commit details
  2. 7.0.0

    frenzzy committed Oct 11, 2018
    Copy the full SHA
    6319db3 View commit details

Commits on Jan 15, 2019

  1. Copy the full SHA
    5552279 View commit details
  2. Copy the full SHA
    19365e0 View commit details
  3. 8.0.0

    frenzzy committed Jan 15, 2019
    Copy the full SHA
    d5e32ce View commit details

Commits on Feb 20, 2019

  1. Add synchronous mode as an add-on (#164)

    * Add a `sync` plugin with a very similar API except synchronous
    
    * Run `npm run build`
    
    * Update docs
    
    * Rename sync to UniversalRouterSync
    
    * Reduce bundle size of sync router
    
    * Export UniversalRouterSync in umd build
    futpib authored and frenzzy committed Feb 20, 2019
    Copy the full SHA
    2f445f3 View commit details
  2. 8.1.0

    frenzzy committed Feb 20, 2019
    Copy the full SHA
    0c664b9 View commit details

Commits on May 1, 2019

  1. Update dev dependencies

    frenzzy committed May 1, 2019
    Copy the full SHA
    fd2a688 View commit details

Commits on May 10, 2019

  1. Copy the full SHA
    9dfb9b4 View commit details
  2. 8.2.0

    frenzzy committed May 10, 2019
    Copy the full SHA
    6fe05f4 View commit details

Commits on May 27, 2019

  1. Create FUNDING.yml

    frenzzy authored May 27, 2019
    Copy the full SHA
    10527c9 View commit details

Commits on Jul 19, 2019

  1. Copy the full SHA
    7cd21a1 View commit details
  2. 8.2.1

    frenzzy committed Jul 19, 2019
    Copy the full SHA
    eabd27d View commit details

Commits on Sep 16, 2019

  1. Copy the full SHA
    e341346 View commit details
  2. 8.3.0

    frenzzy committed Sep 16, 2019
    Copy the full SHA
    871e93d View commit details
Showing with 2,952 additions and 1,345 deletions.
  1. +0 −3 .editorconfig
  2. +1 −1 .eslintrc
  3. +15 −191 .gitattributes
  4. +1 −1 .github/CONTRIBUTING.md
  5. +1 −0 .github/FUNDING.yml
  6. +0 −2 .gitignore
  7. +5 −0 .huskyrc
  8. +1 −8 .prettierrc
  9. +19 −6 .travis.yml
  10. +36 −0 .vscode/launch.json
  11. +49 −1 CHANGELOG.md
  12. +30 −33 README.md
  13. +78 −79 dist/universal-router-generate-urls.js
  14. +1 −1 dist/universal-router-generate-urls.js.map
  15. +1 −1 dist/universal-router-generate-urls.min.js
  16. +1 −1 dist/universal-router-generate-urls.min.js.map
  17. +486 −0 dist/universal-router-sync.js
  18. +1 −0 dist/universal-router-sync.js.map
  19. +3 −0 dist/universal-router-sync.min.js
  20. +1 −0 dist/universal-router-sync.min.js.map
  21. +374 −386 dist/universal-router.js
  22. +1 −1 dist/universal-router.js.map
  23. +1 −1 dist/universal-router.min.js
  24. +1 −1 dist/universal-router.min.js.map
  25. +51 −24 docs/api.md
  26. +3 −1 docs/getting-started.md
  27. +5 −0 jest.config.js
  28. +24 −28 package.json
  29. +73 −0 src/UniversalRouter.d.ts
  30. +14 −26 src/UniversalRouter.js
  31. +73 −0 src/UniversalRouterSync.d.ts
  32. +90 −0 src/UniversalRouterSync.js
  33. +28 −0 src/generateUrls.d.ts
  34. +5 −6 src/generateUrls.js
  35. +21 −0 src/isChildRoute.js
  36. +1 −1 src/matchPath.js
  37. +1 −1 test/.eslintrc
  38. +20 −0 test/README.md
  39. +172 −182 test/{UniversalRouter.spec.js → UniversalRouter.test.js}
  40. +77 −0 test/UniversalRouter.test.ts
  41. +620 −0 test/UniversalRouterSync.test.js
  42. +77 −0 test/UniversalRouterSync.test.ts
  43. +61 −62 test/{generateUrls.spec.js → generateUrls.test.js}
  44. +52 −0 test/generateUrls.test.ts
  45. +0 −221 test/matchPath.spec.js
  46. +182 −0 test/matchPath.test.js
  47. +31 −32 test/{matchRoute.spec.js → matchRoute.test.js}
  48. +28 −0 tools/README.md
  49. +70 −34 tools/build.js
  50. +32 −0 tools/lint.js
  51. +18 −0 tools/pre-commit.js
  52. +7 −10 tools/{precommit.js → test.js}
  53. +9 −0 tsconfig.json
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -6,11 +6,8 @@ root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": [
"airbnb-base",
"plugin:prettier/recommended"
"eslint-config-prettier"
],
"rules": {
"no-param-reassign": ["error", {
206 changes: 15 additions & 191 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,194 +1,18 @@
## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################
# Automatically normalize line endings for all text-based files
# https://git-scm.com/docs/gitattributes#_end_of_line_conversion

## AUTO-DETECT
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto

## SOURCE CODE
*.bat text eol=crlf
*.coffee text
*.css text
*.htm text
*.html text
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.od text
*.onlydata text
*.php text
*.pl text
*.py text
*.rb text
*.sass text
*.scm text
*.scss text
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text

## DOCKER
*.dockerignore text
Dockerfile text

## DOCUMENTATION
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

## TEMPLATES
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text

## LINTERS
.babelrc text
.csslintrc text
.eslintrc text
.htmlhintrc text
.jscsrc text
.jshintrc text
.jshintignore text
.prettierrc text
.stylelintrc text

## CONFIGS
*.bowerrc text
*.cnf text
*.conf text
*.config text
.browserslistrc text
.editorconfig text
.gitattributes text
.gitconfig text
.gitignore text
.htaccess text
*.npmignore text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text

## HEROKU
Procfile text
.slugignore text

## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary

## AUDIO
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

## VIDEO
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary

## ARCHIVES
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

## FONTS
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary

## EXECUTABLES
*.exe binary
*.pyc binary
# For the following file types, normalize line endings to LF on
# checkin and prevent conversion to CRLF when they are checked out
# (this is required in order to prevent newline related issues like,
# for example, after the build script is run)

.* text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.svg text eol=lf
*.ts text eol=lf
*.txt text eol=lf
*.yml text eol=lf
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ included in the project:
```

4. Commit your changes in logical chunks. Please adhere to these [git commit
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your code is unlikely be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/about-git-rebase/)
feature to tidy up your commits before making them public.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: universal-router
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ dist/*

# Test coverage
coverage/
.nyc_output/

# Logs
npm-debug.log*
@@ -20,7 +19,6 @@ yarn-error.log*

# Editors and IDEs
.idea/
.vscode/

# Misc
.DS_Store
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "node tools/pre-commit"
}
}
9 changes: 1 addition & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve",
"arrowParens": "always"
}
25 changes: 19 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# For more information about the configurations used
# in this file, please see the Travis CI documentation:
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs
sudo: false

language: node_js

node_js:
- '9' # stable
- '8' # lts
- '6' # lts
- "node"
- "lts/*"

cache:
directories:
- "node_modules"

before_install:
- npm install --global codecov

script:
- npm run lint
- npm run test
- npm run test -- --coverage
- npm run build

after_success:
- npm run coverage
- codecov

notifications:
email: false
36 changes: 36 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// https://github.com/microsoft/vscode-recipes/tree/master/debugging-jest-tests#debugging-all-tests
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
},
// https://github.com/microsoft/vscode-recipes/tree/master/debugging-jest-tests#debugging-the-current-test
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${fileBasenameNoExtension}", "--config", "jest.config.js"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
Loading