Skip to content

Commit

Permalink
Update browser-extension-url-match dependency
Browse files Browse the repository at this point in the history
- Closes guansss#4
- Add test case to unsure compatibility with future releases
  • Loading branch information
Giglium committed Nov 26, 2024
1 parent e181535 commit 2095585
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 16 deletions.
62 changes: 47 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
},
"dependencies": {
"browser-extension-url-match": "^0.3.3",
"browser-extension-url-match": "^1.0.0",
"lodash": "^4.17.21",
"mitt": "^3.0.1",
"webpack-merge": "^5.9.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// ==UserScript==
// @name Hello world
// @grant GM_log
// @match *://localhost:54220/
// @version 1.0.0
// ==/UserScript==

;(() => {
GM_log("Hello, world!")
})()
3 changes: 3 additions & 0 deletions tests/cases/url-with-port/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.hot?.monkeyReload()

GM_log("Hello, world!")
5 changes: 5 additions & 0 deletions tests/cases/url-with-port/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
name: "Hello world",
version: "1.0.0",
match: ["*://localhost:54220/"],
}
13 changes: 13 additions & 0 deletions tests/cases/url-with-port/url.with.port.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import path from "path"
import { monkey } from "../../../src"
import { test } from "../../env"
import { testBuild, withCommonConfig } from "../../utils/webpack"

const config = withCommonConfig({
entry: path.resolve(__dirname, "index.js"),
output: {
path: path.resolve(__dirname, "dist"),
},
})

test("build", () => testBuild(monkey(config)))

0 comments on commit 2095585

Please sign in to comment.