diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea3baa..4c44ed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # Changelog +## v2.0.1 (21/04/2021) + +#### closed + +- [**closed**] performance improvements [#59](https://github.com/vankeisb/react-tea-cup/pull/59) +- [**closed**] prettify all code [#60](https://github.com/vankeisb/react-tea-cup/pull/60) +- [**closed**] fix raising errors from JSON parse to be strings [#56](https://github.com/vankeisb/react-tea-cup/pull/56) + +#### dependencies + +- [**dependencies**] Bump y18n from 3.2.1 to 3.2.2 [#58](https://github.com/vankeisb/react-tea-cup/pull/58) + +--- + +## v2.0.0 (24/03/2021) + +#### closed + +- [**closed**] [breaking change] intra peer dependencies / no re-exports [#57](https://github.com/vankeisb/react-tea-cup/pull/57) + +--- + +## v1.5.3 (23/03/2021) + +#### closed + +- [**closed**] Moved react to peer dependency [#55](https://github.com/vankeisb/react-tea-cup/pull/55) +- [**closed**] program testing [#49](https://github.com/vankeisb/react-tea-cup/pull/49) +- [**closed**] introduce updatePiped [#54](https://github.com/vankeisb/react-tea-cup/pull/54) + +#### dependencies + +- [**dependencies**] Bump elliptic from 6.5.3 to 6.5.4 [#53](https://github.com/vankeisb/react-tea-cup/pull/53) + +--- + ## v1.5.2 (14/12/2020) *No changelog for this release.* diff --git a/bump-version.js b/bump-version.js new file mode 100644 index 0000000..57a88a0 --- /dev/null +++ b/bump-version.js @@ -0,0 +1,27 @@ +const fs = require('fs'); + +const VERSION = process.env.VERSION; + +console.log("Bumping to " + VERSION); + +function withJsonFile(name, callback) { + const text = fs.readFileSync(name); + const json = JSON.parse(text); + callback(json) + fs.writeFileSync(name, JSON.stringify(json, null, " ")) +} + +withJsonFile("./core/package.json", j => { + j.version = VERSION; +}); + +withJsonFile("./tea-cup/package.json", j => { + j.version = VERSION; + j.peerDependencies['tea-cup-core'] = '^' + VERSION; +}); + +withJsonFile('./samples/package.json', j => { + j.dependencies['tea-cup-core'] = VERSION; + j.dependencies['react-tea-cup'] = VERSION; +}); + diff --git a/core/package.json b/core/package.json index fb3b367..c4a5c53 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "tea-cup-core", - "version": "2.0.1", + "version": "2.1.0", "description": "react-tea-cup core classes and utilities (Maybe etc)", "author": "Rémi Van Keisbelck ", "license": "MIT", @@ -18,4 +18,4 @@ "tsc": "tsc", "compile": "rimraf dist && tsc" } -} +} \ No newline at end of file diff --git a/core/src/TeaCup/index.ts b/core/src/TeaCup/index.ts index 81b77a4..1d85011 100644 --- a/core/src/TeaCup/index.ts +++ b/core/src/TeaCup/index.ts @@ -43,3 +43,4 @@ export * from './ObjectSerializer'; export * from './Try'; export * from './UUID'; export * from './Port'; +export * from './UpdatePiped'; \ No newline at end of file diff --git a/samples/package.json b/samples/package.json index 9821672..35893ec 100644 --- a/samples/package.json +++ b/samples/package.json @@ -11,8 +11,8 @@ "react": "^16.7.0", "react-dom": "^16.7.0", "react-scripts": "3.4.3", - "react-tea-cup": "^2.0.1", - "tea-cup-core": "^2.0.1" + "react-tea-cup": "2.1.0", + "tea-cup-core": "2.1.0" }, "scripts": { "start": "react-scripts start", @@ -39,4 +39,4 @@ "jest-fetch-mock": "^2.1.2", "ts-jest": "^24.1.0" } -} +} \ No newline at end of file diff --git a/tea-cup/package.json b/tea-cup/package.json index 4bc1640..79d840d 100644 --- a/tea-cup/package.json +++ b/tea-cup/package.json @@ -1,6 +1,6 @@ { "name": "react-tea-cup", - "version": "2.0.1", + "version": "2.1.0", "description": "Put some TEA in your React.", "author": "Rémi Van Keisbelck ", "license": "MIT", @@ -22,11 +22,11 @@ "dependencies": {}, "peerDependencies": { "react": "^16.7.0", - "tea-cup-core": "^2.0.1" + "tea-cup-core": "^2.1.0" }, "devDependencies": { "@types/jsdom": "^16.2.5", "@types/react": "^16.7.22", "jsdom": "^16.4.0" } -} +} \ No newline at end of file diff --git a/tea-cup/src/TeaCup/Navigation.test.ts b/tea-cup/src/TeaCup/Navigation.test.ts index f5ffe17..d875bfe 100644 --- a/tea-cup/src/TeaCup/Navigation.test.ts +++ b/tea-cup/src/TeaCup/Navigation.test.ts @@ -97,6 +97,7 @@ const router: Router = new Router( expectRoute('/', home()); expectRoute('/songs', songs(nothing)); +expectRoute('/songs/', songs(nothing)); expectRoute('/song/123', song(123)); expectRoute('/song/123/edit', song(123, true)); expectRoute('/songs?q=foobar', songs(just('foobar'))); diff --git a/tea-cup/src/TeaCup/Navigation.tsx b/tea-cup/src/TeaCup/Navigation.tsx index 461c780..2ed7c24 100644 --- a/tea-cup/src/TeaCup/Navigation.tsx +++ b/tea-cup/src/TeaCup/Navigation.tsx @@ -331,7 +331,7 @@ export class RouteDef implements RouteBase { static sanitizePath(path: string): string { const p1 = path.startsWith('/') ? path.substring(1) : path; - return p1.endsWith('/') ? p1.substring(0, p1.length - 2) : p1; + return p1.endsWith('/') ? p1.substring(0, p1.length - 1) : p1; } static splitPath(path: string): ReadonlyArray { diff --git a/yarn.lock b/yarn.lock index 019b80f..4ef5d1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11705,9 +11705,9 @@ sshpk@^1.7.0: tweetnacl "~0.14.0" ssri@^6.0.0, ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== dependencies: figgy-pudding "^3.5.1"