From f5fa88a1908938ccb0f069df8cdc6c6e1c32472e Mon Sep 17 00:00:00 2001 From: Dong Nguyen Date: Mon, 22 Jan 2024 15:50:31 +0700 Subject: [PATCH 1/4] v4.0.2 - Update dependencies --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 01478f3..bb70a35 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.1", + "version": "4.0.2", "name": "@extractus/oembed-extractor", "description": "Get oEmbed data from given URL.", "homepage": "https://github.com/extractus/oembed-extractor", @@ -33,10 +33,10 @@ "cross-fetch": "^4.0.0" }, "devDependencies": { - "eslint": "^8.47.0", - "https-proxy-agent": "^7.0.1", - "jest": "^29.6.2", - "nock": "^13.3.2" + "eslint": "^8.56.0", + "https-proxy-agent": "^7.0.2", + "jest": "^29.7.0", + "nock": "^13.5.0" }, "keywords": [ "oembed", From 0793ecb0abe5403badee5804aa4bf2d4e1992b21 Mon Sep 17 00:00:00 2001 From: Dong Nguyen Date: Mon, 22 Jan 2024 15:51:26 +0700 Subject: [PATCH 2/4] v4.0.2 - Update provider list --- src/utils/providers.latest.js | 28 +++++++++------ src/utils/providers.orginal.json | 59 ++++++++++++++++++++++---------- src/utils/providers.prev.js | 2 +- 3 files changed, 58 insertions(+), 31 deletions(-) diff --git a/src/utils/providers.latest.js b/src/utils/providers.latest.js index 1355c8c..f5a9754 100644 --- a/src/utils/providers.latest.js +++ b/src/utils/providers.latest.js @@ -1,4 +1,4 @@ -// provider data, synchronized at 2023-08-16T03:16:17.352Z +// provider data, synchronized at 2024-01-22T08:51:16.050Z /* eslint-disable */ @@ -103,10 +103,11 @@ export const providers = [ }, { "s": [ - "studio\\.assemblrworld\\.com/*", + "*\\.studio\\.assemblrworld\\.com/creation/*", + "studio\\.assemblrworld\\.com/creation/*", + "*\\.app-edu\\.assemblrworld\\.com/Creation/*", + "app-edu\\.assemblrworld\\.com/Creation/*", "assemblr\\.world/*", - "app-edu\\.assemblrworld\\.com/*", - "staging\\.d1o2otincy91d\\.amplifyapp\\.com/*", "editor\\.assemblrworld\\.com/*" ], "e": "studio.assemblrworld.com/api/oembed" @@ -166,6 +167,12 @@ export const providers = [ ], "e": "backtracks.fm/oembed" }, + { + "s": [ + "balsamiq\\.cloud/*" + ], + "e": "balsamiq.cloud/oembed" + }, { "s": [ "beams\\.fm/*" @@ -465,6 +472,12 @@ export const providers = [ ], "e": "api.d.tube/oembed" }, + { + "s": [ + "app\\.echoeshq\\.com/embed/*" + ], + "e": "api.echoeshq.com/oembed" + }, { "s": [], "e": "www.edumedia-sciences.com/oembed.json" @@ -651,13 +664,6 @@ export const providers = [ ], "e": "embed.gettyimages.com/oembed" }, - { - "s": [ - "gfycat\\.com/*", - "www\\.gfycat\\.com/*" - ], - "e": "api.gfycat.com/v1/oembed" - }, { "s": [ "www\\.gifnote\\.com/play/*" diff --git a/src/utils/providers.orginal.json b/src/utils/providers.orginal.json index 2dcc934..6c118fd 100644 --- a/src/utils/providers.orginal.json +++ b/src/utils/providers.orginal.json @@ -213,10 +213,17 @@ "endpoints": [ { "schemes": [ - "https://studio.assemblrworld.com/*", + "http://*.studio.assemblrworld.com/creation/*", + "http://studio.assemblrworld.com/creation/*", + "http://*.app-edu.assemblrworld.com/Creation/*", + "http://app-edu.assemblrworld.com/Creation/*", + "http://assemblr.world/*", + "http://editor.assemblrworld.com/*", + "https://*.studio.assemblrworld.com/creation/*", + "https://studio.assemblrworld.com/creation/*", + "https://*.app-edu.assemblrworld.com/Creation/*", + "https://app-edu.assemblrworld.com/Creation/*", "https://assemblr.world/*", - "https://app-edu.assemblrworld.com/*", - "https://staging.d1o2otincy91d.amplifyapp.com/*", "https://editor.assemblrworld.com/*" ], "url": "https://studio.assemblrworld.com/api/oembed", @@ -339,6 +346,19 @@ } ] }, + { + "provider_name": "Balsamiq Cloud", + "provider_url": "https://balsamiq.cloud/", + "endpoints": [ + { + "schemes": [ + "https://balsamiq.cloud/*" + ], + "url": "https://balsamiq.cloud/oembed", + "discovery": true + } + ] + }, { "provider_name": "Beams.fm", "provider_url": "http://beams.fm", @@ -986,6 +1006,23 @@ } ] }, + { + "provider_name": "EchoesHQ", + "provider_url": "https://echoeshq.com", + "endpoints": [ + { + "schemes": [ + "http://app.echoeshq.com/embed/*" + ], + "url": "https://api.echoeshq.com/oembed", + "formats": [ + "json", + "xml" + ], + "discovery": true + } + ] + }, { "provider_name": "eduMedia", "provider_url": "https://www.edumedia-sciences.com/", @@ -1340,22 +1377,6 @@ } ] }, - { - "provider_name": "Gfycat", - "provider_url": "https://gfycat.com/", - "endpoints": [ - { - "schemes": [ - "http://gfycat.com/*", - "http://www.gfycat.com/*", - "https://gfycat.com/*", - "https://www.gfycat.com/*" - ], - "url": "https://api.gfycat.com/v1/oembed", - "discovery": true - } - ] - }, { "provider_name": "Gifnote", "provider_url": "https://www.gifnote.com/", diff --git a/src/utils/providers.prev.js b/src/utils/providers.prev.js index d1eb468..1355c8c 100644 --- a/src/utils/providers.prev.js +++ b/src/utils/providers.prev.js @@ -1,4 +1,4 @@ -// provider data, synchronized at 2023-07-12T01:33:32.812Z +// provider data, synchronized at 2023-08-16T03:16:17.352Z /* eslint-disable */ From 243f801b1772b08a608b1fd2666e59f1697fae8f Mon Sep 17 00:00:00 2001 From: Dong Nguyen Date: Mon, 22 Jan 2024 15:54:11 +0700 Subject: [PATCH 3/4] v4.0.2 - Update CI config --- .github/workflows/ci-test.yml | 27 +++++++++++++++++++-------- .github/workflows/codeql-analysis.yml | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index dd0e193..0c107af 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -8,17 +8,17 @@ on: [push, pull_request] jobs: test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: matrix: - node_version: [14.x, 16.x, 18.x, 20.x] + node_version: [18.x, 20.x, 21.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup Node.js v${{ matrix.node_version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node_version }} @@ -33,18 +33,29 @@ jobs: npm run build --if-present npm run test - - name: sync to coveralls - uses: coverallsapp/github-action@v1.1.2 + - name: Coveralls Parallel + uses: coverallsapp/github-action@v2 with: + flag-name: run-${{ join(matrix.*, '-') }} + parallel: true github-token: ${{ secrets.GITHUB_TOKEN }} - name: cache node modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - + finish: + needs: test + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true + carryforward: "run-18.x,run-20.x,run-21.x" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2124bd6..a77d776 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 26287c714bf7c75ebf526d68d04fc1bce9597670 Mon Sep 17 00:00:00 2001 From: Dong Nguyen Date: Mon, 22 Jan 2024 16:17:05 +0700 Subject: [PATCH 4/4] v4.0.2 - Update test scripts --- package.json | 2 +- src/main.test.js | 2 +- src/utils/fetchEmbed.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bb70a35..61d211c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "types": "./index.d.ts", "engines": { - "node": ">= 15" + "node": ">= 18" }, "scripts": { "lint": "eslint .", diff --git a/src/main.test.js b/src/main.test.js index 4b217e2..684c959 100644 --- a/src/main.test.js +++ b/src/main.test.js @@ -107,7 +107,7 @@ describe('test if extract() with some popular providers', () => { const cases = [ { input: { - url: 'https://youtu.be/qQpb1oCernE', + url: 'https://youtu.be/iQzwqZgr8Hc', file: './test-data/youtube.json', }, expected: { diff --git a/src/utils/fetchEmbed.test.js b/src/utils/fetchEmbed.test.js index e94f767..0ca3ab8 100644 --- a/src/utils/fetchEmbed.test.js +++ b/src/utils/fetchEmbed.test.js @@ -18,7 +18,7 @@ describe('test if fetchEmbed() works correctly', () => { const cases = [ { input: { - url: 'https://youtu.be/qQpb1oCernE', + url: 'https://youtu.be/iQzwqZgr8Hc', file: './test-data/youtube.json', }, expected: {