Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5 #751

Merged
merged 133 commits into from
Jun 12, 2020
Merged

v5 #751

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
4b8a816
Remove deprecated files from v4
mjackson Nov 4, 2019
c013f2f
Update ESLint config
mjackson Nov 4, 2019
5416474
Main v5 rewrite
mjackson Nov 5, 2019
d51e9b7
Use ES6 ESLint env
mjackson Nov 5, 2019
7496807
Tweak test function format
mjackson Nov 5, 2019
824ed29
Consolidate push/replace => navigate
mjackson Nov 6, 2019
3cc181f
Add beforeunload fixture
mjackson Nov 6, 2019
4bf15b1
Add location.index + fix blocking POP actions
mjackson Nov 6, 2019
0831aae
Add history.retry for retrying transitions
mjackson Nov 6, 2019
c1702ab
Run all tests in parallel
mjackson Nov 6, 2019
67f6aea
Remove location.index, use history.push/replace
mjackson Nov 7, 2019
87a042e
Update block fixtures
mjackson Nov 7, 2019
bb91b28
Skip failing tests
mjackson Nov 7, 2019
d9013e4
Fix hash history test reset
mjackson Nov 7, 2019
dc947ec
Remove encoding tests
mjackson Nov 7, 2019
8b3be6f
Add back missing pathname support
mjackson Nov 7, 2019
2acce39
Remove Safari from testing, hopefully temporary
mjackson Nov 7, 2019
50997b3
Small tweaks
mjackson Nov 7, 2019
c647e9c
Rename to avoid collision with browser globals
mjackson Nov 8, 2019
02b43fd
Update docs
mjackson Nov 8, 2019
105b64a
5.0.0-beta.0
mjackson Nov 8, 2019
f1ba1cd
No need to return push/replace values from retry
mjackson Nov 15, 2019
a9825bd
Only use Object.freeze in dev
mjackson Nov 15, 2019
da24367
Small tweaks
mjackson Nov 15, 2019
d09f4fe
Use Closure Compiler with Advanced Mode (#753)
kristoferbaxter Nov 20, 2019
59c5d5d
Remove CommonJS builds
mjackson Nov 20, 2019
9338571
Change global name from History => HistoryLib
mjackson Nov 20, 2019
0b350a3
Remove BUILD_ENV var
mjackson Nov 20, 2019
2058791
Add is*History functions for type checking
mjackson Nov 20, 2019
dd4f4be
More explicit externals
mjackson Nov 20, 2019
dbb8900
Remove transform-object-assign Babel plugin
mjackson Nov 20, 2019
ad95d95
Move mem history to last
mjackson Nov 20, 2019
d0011ed
Generate sourcemaps
mjackson Nov 22, 2019
ec6aa85
Update global UMD name
mjackson Nov 22, 2019
4083639
Update global UMD name to "HistoryLibrary"
mjackson Nov 22, 2019
11b295b
Update ignore paths
mjackson Dec 2, 2019
9b90395
Fix CommonJS entry point
mjackson Dec 2, 2019
211bb9f
Use simple optimizations instead of advanced
mjackson Dec 3, 2019
4c2a05a
Remove is*History functions
mjackson Dec 3, 2019
0ada9c2
Update size check paths
mjackson Dec 3, 2019
434fe90
Remove TEST_ENV variable
mjackson Dec 3, 2019
65dd4be
Version 5.0.0-beta.1
mjackson Dec 3, 2019
39c4af9
Explicitly include index.js
mjackson Dec 3, 2019
e2833f7
Use simple optimizations
mjackson Dec 3, 2019
5f19f4b
Rework builds
mjackson Dec 7, 2019
a6abd69
Fine-tuning the build
mjackson Dec 7, 2019
6d901ec
Use PRETTY env var to run prettier on builds
mjackson Dec 7, 2019
30951b7
Run the build before tests on Travis
mjackson Dec 7, 2019
7367169
Fix loading tests in IE11
mjackson Dec 7, 2019
b6bbdce
Run build before size check
mjackson Dec 7, 2019
4b149df
Run CommonJS entry point through CC
mjackson Dec 7, 2019
969a267
Fix deploy script
mjackson Dec 7, 2019
643e666
Version 5.0.0-beta.2
mjackson Dec 7, 2019
c43d1a4
Remove loose-envify dep
mjackson Dec 7, 2019
d2db803
Add browser module builds
mjackson Dec 10, 2019
0e43e72
Output ES8 in browser modules
mjackson Dec 11, 2019
9ffbead
Version 5.0.0-beta.3
mjackson Dec 11, 2019
e6c94da
Upgrade Rollup
mjackson Dec 11, 2019
88163eb
Rename some source files
mjackson Dec 18, 2019
e6df3da
Update build scripts
mjackson Dec 19, 2019
f81c90a
Also accept a string in createHref
mjackson Dec 19, 2019
bcb89a3
Remove unnecessary "use strict"
mjackson Dec 19, 2019
18dff0b
Clearer blocking description and typo fix
pshrmn Jan 5, 2020
85b134c
console.warn instead of throwing warnings in dev
mjackson Jan 22, 2020
2d74ea5
Export parsePath and createPath helpers
mjackson Jan 22, 2020
34f405b
Increase size limit for UMD bundle
mjackson Jan 22, 2020
97c3163
Version 5.0.0-beta.4
mjackson Jan 22, 2020
9532fb2
Reformat some docs files
mjackson Feb 3, 2020
5c56e90
Upgrade filesize dep
mjackson Feb 4, 2020
5f72346
Update cc rollup plugin
mjackson Feb 4, 2020
b266c94
Move files out of modules dir
mjackson Feb 6, 2020
e181153
Rename node-main.js to main.js in package output
mjackson Feb 7, 2020
4bfb134
Remove TODO about using hashchange
mjackson Feb 7, 2020
083400c
Add TypeScript declaration files
mjackson Feb 7, 2020
e25626f
Version 5.0.0-beta.5
mjackson Feb 7, 2020
a8a056b
Fix TS linting issues
mjackson Feb 7, 2020
aba0c9f
Fix no-unused-vars lint errors in TS files
mjackson Feb 14, 2020
fd866b2
Add version + publish scripts
mjackson Feb 18, 2020
007b42d
Configure CircleCI
mjackson Mar 24, 2020
1bb5554
Update BrowserStack config
mjackson Mar 25, 2020
a62364a
Update CircleCI config
mjackson Mar 25, 2020
44f6662
Remove Travis config
mjackson Mar 25, 2020
fc00d36
Use annotated git tags
mjackson Mar 25, 2020
21e6b8c
Use separate workflows for build + deploy
mjackson Mar 25, 2020
6695288
Trying out a different config for CircleCI
mjackson Mar 26, 2020
501d3f1
Use cleaned version from command prompt
mjackson Mar 26, 2020
374c0e0
Try again, yay
mjackson Mar 26, 2020
e91dbcf
Another try, weeee!!
mjackson Mar 26, 2020
820d032
Version 5.0.0-beta.6
mjackson Mar 26, 2020
0c5d004
Use Travis CI
mjackson Mar 26, 2020
2d91489
Version 5.0.0-beta.7
mjackson Mar 26, 2020
cb3897c
Use explicit install step
mjackson Mar 26, 2020
7904e45
Consolidate test utils
mjackson Mar 27, 2020
1e91a64
Convert to TypeScript
mjackson Apr 15, 2020
72e513e
Update doc comment
mjackson Apr 17, 2020
6ad66e3
Version 5.0.0-beta.8
mjackson Apr 17, 2020
59e7e6c
Add generics for events collections
mjackson Apr 22, 2020
10c36a6
location.state should be `null` by default
mjackson Apr 22, 2020
b2ccfd5
Some types tweaks
mjackson Apr 22, 2020
9bf1254
More types tweaks
mjackson Apr 24, 2020
2153e3e
Add LocationPieces interface
mjackson Apr 24, 2020
f210445
State type union with null
mjackson Apr 24, 2020
e282eba
Comment formatting
mjackson Apr 24, 2020
3a9cc2b
Add more details + links to doc comments
mjackson Apr 24, 2020
943f377
Use ... instead of Object.assign
mjackson Apr 29, 2020
2145ce3
Fix working directory clean check
mjackson Apr 29, 2020
c692ca5
Version 5.0.0-beta.9
mjackson Apr 29, 2020
513edad
Ran yarn upgrade
mjackson Apr 29, 2020
46eaaad
Add type aliases for some primitives
mjackson May 1, 2020
6996dd7
Re-formatting
mjackson May 12, 2020
fca4907
Add a generic type to readOnly
mjackson May 15, 2020
0f99273
Memory history initial index defaults to last
mjackson May 15, 2020
0b066ba
Update some docs
mjackson May 15, 2020
5a5d611
Rename n => delta
mjackson May 15, 2020
8402b31
Added API reference doc
mjackson May 15, 2020
fc0c588
Update docs README
mjackson May 15, 2020
35d1b3f
Update API reference links
mjackson May 15, 2020
3a32a36
Update docs
mjackson May 15, 2020
700f019
Use cleaner anchors
mjackson May 15, 2020
d1b2808
Add API docs for state
mjackson May 15, 2020
79bb32a
Update API reference intro
mjackson May 15, 2020
313f1c2
Minor docs tweaks
mjackson May 15, 2020
742a3a4
Add script for generating API docs
mjackson Jun 3, 2020
90144a7
Some scripts tweaks
mjackson Jun 3, 2020
da807d5
Export types for options objects
mjackson Jun 7, 2020
138ba28
Remove typeParam docs
mjackson Jun 7, 2020
f88b174
Small tweaks to api reference
mjackson Jun 7, 2020
0f95d29
More tweaks to API docs
mjackson Jun 8, 2020
1babffe
Update API docs
mjackson Jun 10, 2020
a7ae54c
More docs + IntelliSense doc comments
mjackson Jun 12, 2020
41bacf0
Add more links to doc comments
mjackson Jun 12, 2020
4ab6a42
Restore syntax highlights in declaration blocks
mjackson Jun 12, 2020
987ff43
Add some more type declarations
mjackson Jun 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/build
/fixtures

node_modules/
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "react-app"
}
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/node_modules/
/esm/
/cjs/
/umd/
/local.log
/build/
/fixtures/*/history.js

node_modules/
26 changes: 0 additions & 26 deletions .size-snapshot.json

This file was deleted.

34 changes: 13 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
language: node_js
node_js: node
cache: yarn
env:
- TEST_ENV=cjs BUILD_ENV=cjs
- TEST_ENV=umd BUILD_ENV=umd
- TEST_ENV=source
before_script:
- ([[ -z "$BUILD_ENV" ]] || yarn build)
script:
- yarn lint
- yarn test
jobs:
include:
- stage: Release
if: tag =~ ^v[0-9]
env: NPM_TAG=$([[ "$TRAVIS_TAG" == *-* ]] && echo "next" || echo "latest")
script: echo "Releasing $TRAVIS_TAG to npm with tag \"$NPM_TAG\" ..."
deploy:
provider: npm
skip_cleanup: true
tag: "$NPM_TAG"
email: [email protected]
api_key: "$NPM_TOKEN"
on:
tags: true
- stage: Test
install: yarn install --frozen-lockfile
before_script: yarn build
script:
- yarn test
- yarn size
- stage: Release
if: tag =~ ^v[0-9]
install: yarn install --frozen-lockfile
before_script: yarn build
script:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- node scripts/publish.js
3 changes: 0 additions & 3 deletions DOMUtils.js

This file was deleted.

3 changes: 0 additions & 3 deletions ExecutionEnvironment.js

This file was deleted.

3 changes: 0 additions & 3 deletions LocationUtils.js

This file was deleted.

3 changes: 0 additions & 3 deletions PathUtils.js

This file was deleted.

30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,37 @@
[build-badge]: https://img.shields.io/travis/ReactTraining/history/master.svg?style=flat-square
[build]: https://travis-ci.org/ReactTraining/history

The history library lets you easily manage session history anywhere JavaScript runs. `history` abstracts away the differences in various environments and provides a minimal API that lets you manage the history stack, navigate, and persist state between sessions.
The history library lets you easily manage session history anywhere JavaScript
runs. A `history` object abstracts away the differences in various environments
and provides a minimal API that lets you manage the history stack, navigate, and
persist state between sessions.

## Documentation

Documentation for the current branch can be found in the [docs](docs) directory.

## Changes

To see the changes that were made in a given release, please lookup the tag on [the releases page](https://github.com/ReactTraining/history/releases).
To see the changes that were made in a given release, please lookup the tag on
[the releases page](https://github.com/ReactTraining/history/releases).

For changes released in version 4.6.3 and earlier, please see [the `CHANGES.md` file](https://github.com/ReactTraining/history/blob/845d690c5576c7f55ecbe14babe0092e8e5bc2bb/CHANGES.md).
For changes released in version 4.6.3 and earlier, please see [the `CHANGES.md`
file](https://github.com/ReactTraining/history/blob/845d690c5576c7f55ecbe14babe0092e8e5bc2bb/CHANGES.md).

## Development

Development of the current stable release, version 4, happens on [the `master` branch](https://github.com/ReactTraining/history/tree/master). Please keep in mind that this branch may include some work that has not yet been published as part of an official release. However, since `master` is always stable, you should feel free to build your own working release straight from master at any time.
Development of the current stable release, version 4, happens on [the `master`
branch](https://github.com/ReactTraining/history/tree/master). Please keep in
mind that this branch may include some work that has not yet been published as
part of an official release. However, since `master` is always stable, you
should feel free to build your own working release straight from master at any
time.

Development of the next major release, version 5, happens on [the `dev` branch](https://github.com/ReactTraining/history/tree/dev).
Development of the next major release, version 5, happens on [the `dev`
branch](https://github.com/ReactTraining/history/tree/dev).

If you're interested in helping out, please read [our contributing guidelines](CONTRIBUTING.md).
If you're interested in helping out, please read [our contributing
guidelines](CONTRIBUTING.md).

## About

Expand All @@ -33,6 +45,8 @@ you're interested in learning more about what React can do for your company, ple

## Thanks

A big thank-you to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to run our build in real browsers.
A big thank-you to [BrowserStack](https://www.browserstack.com/) for providing
the infrastructure that allows us to run our build in real browsers.

Also, thanks to [Dan Shaw](https://www.npmjs.com/~dshaw) for letting us use the `history` npm package name. Thanks, Dan!
Also, thanks to [Dan Shaw](https://www.npmjs.com/~dshaw) for letting us use the
`history` npm package name. Thanks, Dan!
3 changes: 0 additions & 3 deletions createBrowserHistory.js

This file was deleted.

3 changes: 0 additions & 3 deletions createHashHistory.js

This file was deleted.

3 changes: 0 additions & 3 deletions createMemoryHistory.js

This file was deleted.

3 changes: 0 additions & 3 deletions createTransitionManager.js

This file was deleted.

38 changes: 0 additions & 38 deletions docs/Blocking.md

This file was deleted.

110 changes: 0 additions & 110 deletions docs/GettingStarted.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/Installation.md

This file was deleted.

Loading