Skip to content

2.0: bye coffeescript, hello typescript #51

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

Open
wants to merge 117 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
bf6295d
url-pattern.ts = coffee-to-typescript(src/url-pattern.coffee)
snd Apr 27, 2019
38bffe9
get rid of module system managing code
snd Apr 27, 2019
9f58cee
delete src/url-pattern.coffee
snd Apr 27, 2019
26b44dc
no longer need index.d.ts since we use ts for original source
snd Apr 27, 2019
96932ad
url-pattern.ts: refactoring into correct typescript
snd Apr 28, 2019
d842dee
url-pattern.ts -> index.ts
snd Apr 28, 2019
85c6ef3
index.ts: consistency and comments
snd Apr 28, 2019
818f4d7
add initial tsconfig.json
snd Apr 28, 2019
a4cdde6
remove compiled js in lib/url-pattern.js
snd Apr 28, 2019
f1b3323
add default tslint.json
snd Apr 28, 2019
dab5f81
index.ts: fix a lot of linter errors
snd Apr 28, 2019
10f9165
convert tests from coffee to javascript
snd Apr 28, 2019
d06e1d1
index.ts: export things, fix errors, fix parser returns
snd Apr 28, 2019
d67db52
index.ts: decrease line size
snd Apr 28, 2019
39b9350
index.ts: dont put everything on UrlPattern and export that
snd Apr 28, 2019
c1ba518
index.ts: get rid of forEach
snd Apr 28, 2019
e4e45ce
make test/helpers.js pass
snd Apr 28, 2019
ebe45cf
make test/parser.js pass
snd Apr 28, 2019
69253a2
make test/ast.js pass
snd Apr 28, 2019
b619202
tslint.json: allow 5 classes per file
snd Apr 28, 2019
e60d6a9
index.ts: fix escapeChar options assignment
snd Apr 28, 2019
2fdac95
make test/readme.js pass
snd Apr 28, 2019
d1b7354
make test/errors.js pass
snd Apr 28, 2019
d470b0c
make test/match-fixtures.js pass
snd Apr 28, 2019
2fb3327
changelog for 0.11
snd Apr 28, 2019
d70210b
make test/misc.js pass
snd Apr 28, 2019
26b58a6
make test/readme.js pass
snd Apr 28, 2019
7507eaa
make test/stringify-fixtures.js pass
snd Apr 28, 2019
8325b31
update tsconfig.json to make it more strict
snd Apr 28, 2019
32357c7
index.ts: linter and compiler fixes
snd Apr 28, 2019
eacad74
cleanup tests
snd Apr 30, 2019
da792be
gitignore dist dir
snd Apr 30, 2019
fea0e8b
split source into multiple files and refactor some more
snd Apr 30, 2019
441a3c5
tsconfig: generate ES6 and compile src into dist
snd Apr 30, 2019
aee3410
fix next version in changelog
snd Apr 30, 2019
8002edc
add _ to default segmentNameCharset
snd Apr 30, 2019
7c1f802
package.json: update dependencies and work on scripts
snd Apr 30, 2019
130e0a7
fix type for helpers.concatMap
snd Apr 30, 2019
d34cd6a
gitignore package-lock.json
snd Apr 30, 2019
2861b95
remove tests for wildcard which are overkill
snd Apr 30, 2019
080c6eb
extend and refactor parser. all tests pass. npm test works
snd Apr 30, 2019
c0eadbb
package.json: add tslint
snd Apr 30, 2019
ab6d4de
package.json: add typescript
snd Apr 30, 2019
32ee159
package.json: fix doc command
snd Apr 30, 2019
356477a
fix docstrings for helpers
snd Apr 30, 2019
01d87c1
better type variable names for concatMap
snd Apr 30, 2019
50fa301
package.json: remove engines
snd Apr 30, 2019
7f80b5f
.travis.yml: try to get minimal CI working
snd Apr 30, 2019
20d84ed
.travis.yml: fixes
snd Apr 30, 2019
75a5a05
update readme
snd May 1, 2019
5a01fc5
lint on travis
snd May 6, 2019
167c476
better docs and names for parsers
snd May 6, 2019
c2ab445
run npm audit on travis
snd May 6, 2019
b6a053e
make ts-node tape and nyc interact to produce coverage
snd May 6, 2019
0469a01
mv test/helpers.{js,ts}
snd May 6, 2019
11c6877
run converage on travis
snd May 6, 2019
d775850
fix travis script
snd May 6, 2019
691beec
mv test/readme.{js,ts}
snd May 6, 2019
ece00b2
mv test/misc.{js,ts}
snd May 6, 2019
163473c
add missing constructor type to UrlPattern
snd May 6, 2019
18e395a
mv test/errors.{js,ts}
snd May 6, 2019
62e8e49
fix typings for parser.getParam
snd May 6, 2019
557285d
mv test/ast.{js,ts}
snd May 6, 2019
c375341
mv test/parser.{js,ts}
snd May 6, 2019
26a2775
mv test/match-fixtures.{js,ts}
snd May 6, 2019
39d72eb
test/stringify-fixtures.{js,ts}
snd May 6, 2019
4b12c66
some work on readme
snd May 6, 2019
9c9f9f8
much better error message on partial parse
snd May 9, 2019
60cfd38
package.json: add ts-node command
snd May 9, 2019
7c0d663
add some tests for parsercombinators
snd May 9, 2019
603b510
README.md: wording and minor changes
snd May 9, 2019
581bc14
make tests for errors pass again
snd May 9, 2019
7931231
add some more match fixtures
snd May 9, 2019
f074f80
add comments to tests
snd May 9, 2019
515a654
sync up readme and tests for readme a bit
snd May 9, 2019
ac5ea66
readme: var to const/let and fix paths
snd May 9, 2019
e14c064
readme: document named wildcards
snd May 9, 2019
5ae12ce
parser: more support for named wildcards
snd May 9, 2019
d976ac8
ast tests for named wildcards
snd May 9, 2019
4d7ffa7
make readme tests pass
snd May 9, 2019
78865f2
add test for error increasing coverage
snd May 9, 2019
c818b10
src/parsercombinators.ts -> src/parser-combinators.ts
snd May 9, 2019
ed72dc0
renames
snd May 11, 2019
497c67f
anonymous wildcards aren't captured. names must be unique. refactoring
snd May 13, 2019
819870d
test/ast.ts -> test/ast-helpers.ts
snd May 13, 2019
f01e6fd
package.json: rename command
snd May 13, 2019
9e9990e
code formatting
snd May 13, 2019
ae8001c
error on duplicate segment names. simplify
snd May 13, 2019
f258c81
document regexGroupCount and increase code coverage
snd May 13, 2019
fe9375e
make npm run coverage output reproducable
snd May 13, 2019
ede87eb
ignore coverage artifacts
snd May 13, 2019
ac175dd
test for another error
snd May 13, 2019
b3f2b61
better variable name
snd May 13, 2019
34961a0
fix commands in package.json
snd May 13, 2019
dc53d45
improve docstring
snd May 13, 2019
253d3dd
improve docstrings
snd May 13, 2019
6b49532
simplify code by using Object.assign
snd May 13, 2019
4408b70
make second names argument mandatory for regexes
snd May 13, 2019
1fcfb04
add explicit .ts extensions to imports
snd May 13, 2019
5ceb482
.travis.yml: update node version
snd May 13, 2019
84a26e7
plenty of work on readme
snd May 13, 2019
b854cb1
more work on readme
snd May 13, 2019
12e20f6
add initial version of deno test
snd May 13, 2019
9907600
minor changes to readme
snd May 13, 2019
af755b9
sync up readme test with readme
snd May 13, 2019
5dbd17c
try to fix deno test on travis
snd May 13, 2019
2294e59
simplify .travis.yml
snd May 13, 2019
1858782
fix travis build
snd May 13, 2019
406e441
improve travis.yml
snd May 13, 2019
d1b2f46
travis: language generic -> minimal
snd May 13, 2019
a384d52
initial work on creating a bundle with parcel
snd May 14, 2019
725a19f
remove colon in readme
snd May 14, 2019
76a4b36
add final "OK" to deno-test
snd May 14, 2019
715c6af
improve file links in package.json
snd May 15, 2019
d76a23e
bump version to 2.0.0
snd May 15, 2019
8fcd6a5
reorder package.json and add karma for testing
snd May 15, 2019
a3887a3
add test for error increasing code coverage
snd Nov 25, 2019
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ node_modules/**
test/url-pattern.js
**.DS_Store
npm-debug.log
dist
package-lock.json
.nyc_output
coverage
52 changes: 21 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,27 @@
language: node_js
node_js:
- "0.12"
- "iojs-3"
- "4"
- "5"
script: npm run $NPM_COMMAND
sudo: false
matrix:
include:
- language: node_js
node_js: "12"
script:
- npm audit
- npm run compile
- npm run lint
- npm run coverage
- npm run bundle
- node parcel-bundle-test.js
- language: node_js
node_js: "10.15"
script:
- npm test
- language: minimal
name: "deno"
script:
- curl -fsSL https://deno.land/x/install/install.sh | sh
- export PATH="$HOME/.deno/bin:$PATH"
- deno run deno-test.ts
env:
global:
# SAUCE_USERNAME
- secure: "Js6Pr7dJfvAKY5JuuuEJSrDvoBCrnjTjISMCPBmH0CkGwtGR7J2mCvaLcXQ9RO3zrSasdj8Rb6gBmrIgk1fQbp/NpwQVwMUPH4J+dhbwTHIrrIHVtxt6q8cPx43RJqjE6qN+G1MA/Y4IVbgAzjJPnzu6A6v7E/FzSFbpNilv2i4="
# SAUCE_ACCESS_KEY
- secure: "idJFmSy6EyMNO9UoxUx0wG83G/w8H1Sh1fG5lWodAdV01/Ft0j3KQo/zelENBx7zMWf+iqdWOhL4rBLIIkaajHbmvkMYDzhFXK4GIZmd1HnV4MZCunipscMsEbtQU+uTY/I3fersnIz74aTuj3SKlFW4jVNgvc8fawijBtTbuhU="
matrix:
- NPM_COMMAND=test
- NPM_COMMAND=test-with-coverage
- NPM_COMMAND=test-in-browsers
matrix:
exclude:
# don't test in browsers more than once (already done with node 5)
- node_js: "0.12"
env: NPM_COMMAND=test-in-browsers
- node_js: "iojs-3"
env: NPM_COMMAND=test-in-browsers
- node_js: "4"
env: NPM_COMMAND=test-in-browsers
# don't collect code coverage more than once (already done with node 5)
- node_js: "0.12"
env: NPM_COMMAND=test-with-coverage
- node_js: "iojs-3"
env: NPM_COMMAND=test-with-coverage
- node_js: "4"
env: NPM_COMMAND=test-with-coverage
# already tested with coverage (with node 5). no need to test again without
- node_js: "5"
env: NPM_COMMAND=test
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,10 @@ non breaking
non breaking

messages on errors thrown on invalid patterns have changed slightly.

#### 2.0

- UrlPattern now uses typescript instead of coffeescript
- renamed `UrlPattern.newParser` to `UrlPattern.newUrlPatternParser`
- renamed `UrlPattern.escapeStringForRegex` to `UrlPattern.escapeStringForRegex`
- `UrlPattern.match` now returns `undefined` (previously `null`) if there's no match
Loading