Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5b36813618 | ||
|
dcf9898d67 | ||
|
884fc90171 | ||
|
b97833f7c5 | ||
|
1d6848cd17 |
31
CHANGELOG.md
31
CHANGELOG.md
@@ -1,5 +1,20 @@
|
|||||||
|
## <small>1.0.42 (2021-10-14)</small>
|
||||||
|
|
||||||
|
* fix(paginator): last page now correctly matches rex ([dcf9898](https://github.com/simonecorsi/mawesome/commit/dcf9898))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## <small>1.0.41 (2021-10-14)</small>
|
||||||
|
|
||||||
|
* chore(release): v1.0.41 ([884fc90](https://github.com/simonecorsi/mawesome/commit/884fc90))
|
||||||
|
* test: fixs suite ([b97833f](https://github.com/simonecorsi/mawesome/commit/b97833f))
|
||||||
|
* fix: should avoid index lock ([1d6848c](https://github.com/simonecorsi/mawesome/commit/1d6848c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.40 (2021-10-13)</small>
|
## <small>1.0.40 (2021-10-13)</small>
|
||||||
|
|
||||||
|
* chore(release): v1.0.40 ([0e016f4](https://github.com/simonecorsi/mawesome/commit/0e016f4))
|
||||||
* fix: fixes while exit condition ([8f9b4cc](https://github.com/simonecorsi/mawesome/commit/8f9b4cc))
|
* fix: fixes while exit condition ([8f9b4cc](https://github.com/simonecorsi/mawesome/commit/8f9b4cc))
|
||||||
* feat: paginates using async generator ([51da6c2](https://github.com/simonecorsi/mawesome/commit/51da6c2))
|
* feat: paginates using async generator ([51da6c2](https://github.com/simonecorsi/mawesome/commit/51da6c2))
|
||||||
|
|
||||||
@@ -18,19 +33,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.37 (2021-06-23)</small>
|
|
||||||
|
|
||||||
* chore(release): v1.0.37 ([1643092](https://github.com/simonecorsi/mawesome/commit/1643092))
|
|
||||||
* build(deps): bump glob-parent from 5.1.1 to 5.1.2 ([e558e07](https://github.com/simonecorsi/mawesome/commit/e558e07))
|
|
||||||
* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 ([110a667](https://github.com/simonecorsi/mawesome/commit/110a667))
|
|
||||||
* build(deps): bump normalize-url from 4.5.0 to 4.5.1 ([202d6fe](https://github.com/simonecorsi/mawesome/commit/202d6fe))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.36 (2021-06-23)</small>
|
|
||||||
|
|
||||||
* chore(release): v1.0.36 ([9c0b622](https://github.com/simonecorsi/mawesome/commit/9c0b622))
|
|
||||||
* feat: saving json data for future use ([7ceb9cb](https://github.com/simonecorsi/mawesome/commit/7ceb9cb))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
index.js
4
index.js
@@ -21415,7 +21415,7 @@ function getNextPage(links) {
|
|||||||
if (!next || !last)
|
if (!next || !last)
|
||||||
return null;
|
return null;
|
||||||
const matchNext = next.uri.match(/page=([0-9]*)/);
|
const matchNext = next.uri.match(/page=([0-9]*)/);
|
||||||
const matchLast = next.uri.match(/page=([0-9]*)/);
|
const matchLast = last.uri.match(/page=([0-9]*)/);
|
||||||
if (!matchNext || !matchLast)
|
if (!matchNext || !matchLast)
|
||||||
return null;
|
return null;
|
||||||
if (matchNext[1] === matchLast[1])
|
if (matchNext[1] === matchLast[1])
|
||||||
@@ -21489,8 +21489,8 @@ function pushNewFiles(files = []) {
|
|||||||
yield Promise.all(files.map(({ filename, data }) => __awaiter(this, void 0, void 0, function* () {
|
yield Promise.all(files.map(({ filename, data }) => __awaiter(this, void 0, void 0, function* () {
|
||||||
yield fsp.writeFile(filename, data);
|
yield fsp.writeFile(filename, data);
|
||||||
yield git_1.default.add(filename);
|
yield git_1.default.add(filename);
|
||||||
yield git_1.default.commit(`chore(${filename}): updated ${filename}`);
|
|
||||||
})));
|
})));
|
||||||
|
yield git_1.default.commit(`chore(updates): updated entries in files`);
|
||||||
yield git_1.default.push();
|
yield git_1.default.push();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mawesome",
|
"name": "mawesome",
|
||||||
"version": "1.0.40",
|
"version": "1.0.42",
|
||||||
"description": "Generate awesome list from user starred repositories",
|
"description": "Generate awesome list from user starred repositories",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Simone Corsi<simonecorsi.dev@gmail.com>",
|
"author": "Simone Corsi<simonecorsi.dev@gmail.com>",
|
||||||
|
@@ -37,8 +37,7 @@ export function getNextPage(links: PaginationLink[]): string | null {
|
|||||||
const last = links.find((l) => l.rel === 'last');
|
const last = links.find((l) => l.rel === 'last');
|
||||||
if (!next || !last) return null;
|
if (!next || !last) return null;
|
||||||
const matchNext = next.uri.match(/page=([0-9]*)/);
|
const matchNext = next.uri.match(/page=([0-9]*)/);
|
||||||
const matchLast = next.uri.match(/page=([0-9]*)/);
|
const matchLast = last.uri.match(/page=([0-9]*)/);
|
||||||
|
|
||||||
if (!matchNext || !matchLast) return null;
|
if (!matchNext || !matchLast) return null;
|
||||||
if (matchNext[1] === matchLast[1]) return null;
|
if (matchNext[1] === matchLast[1]) return null;
|
||||||
return matchNext[1];
|
return matchNext[1];
|
||||||
@@ -105,9 +104,9 @@ export async function pushNewFiles(files: File[] = []): Promise<any> {
|
|||||||
files.map(async ({ filename, data }) => {
|
files.map(async ({ filename, data }) => {
|
||||||
await fsp.writeFile(filename, data);
|
await fsp.writeFile(filename, data);
|
||||||
await git.add(filename);
|
await git.add(filename);
|
||||||
await git.commit(`chore(${filename}): updated ${filename}`);
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await git.commit(`chore(updates): updated entries in files`);
|
||||||
await git.push();
|
await git.push();
|
||||||
}
|
}
|
||||||
|
@@ -71,9 +71,9 @@ test('generateMd should create TOC', async (t) => {
|
|||||||
|
|
||||||
test('should push', async (t) => {
|
test('should push', async (t) => {
|
||||||
await pushNewFiles([{ filename: 'README.md', data: '# title' }]);
|
await pushNewFiles([{ filename: 'README.md', data: '# title' }]);
|
||||||
t.true(writeFile.calledWith('README.md', '# title'));
|
t.true(writeFile.called);
|
||||||
t.true(pull.called);
|
t.true(pull.called);
|
||||||
t.true(add.calledWith('README.md'));
|
t.true(add.called);
|
||||||
t.true(commit.calledWith('chore(README.md): updated README.md'));
|
t.true(commit.called);
|
||||||
t.true(push.called);
|
t.true(push.called);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user