Skip to content

Commit

Permalink
v1 release (#9)
Browse files Browse the repository at this point in the history
Experiment with ESM module, failed miserably. Fallback everything to CJS.
  • Loading branch information
louisgv authored Feb 19, 2022
2 parents 3d242ce + ec658ee commit 2cc5407
Show file tree
Hide file tree
Showing 13 changed files with 49,417 additions and 69,077 deletions.
4 changes: 2 additions & 2 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { cwd, env, execPath } from "process"

test("dry runner with env/stdout protocol", async () => {
const templateKeysPath = join(cwd(), "keys.template.json")
const ip = join(cwd(), "lib", "main.js")
const ip = join(cwd(), "dist", "index.js")
const templateKeys = await readFile(templateKeysPath, "utf8")

env["INPUT_KEYS"] = templateKeys
Expand All @@ -16,5 +16,5 @@ test("dry runner with env/stdout protocol", async () => {
env
}

console.log(execFileSync(execPath, [ip], options).toString())
console.log(execFileSync(execPath, [ip], options).toString("utf-8"))
})
109,964 changes: 43,610 additions & 66,354 deletions dist/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/initialize-node.js

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

3,268 changes: 3,268 additions & 0 deletions dist/license.txt

Large diffs are not rendered by default.

4,487 changes: 2,046 additions & 2,441 deletions dist/licenses.txt

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions jest.config.js

This file was deleted.

9 changes: 9 additions & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
clearMocks: true,
moduleFileExtensions: ["js", "ts"],
testMatch: ["**/*.test.ts"],
transform: {
"^.+\\.ts$": "ts-jest"
},
verbose: true
}
7 changes: 2 additions & 5 deletions keys.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"Chrome": {
"description": "For refreshToken, clientId and clientSecret, follow: https://github.com/fregante/chrome-webstore-upload/blob/main/How%20to%20generate%20Google%20API%20keys.md",
"description": "For refreshToken and clientId, follow: https://github.com/fregante/chrome-webstore-upload/blob/main/How%20to%20generate%20Google%20API%20keys.md",
"type": "object",
"properties": {
"extId": {
Expand All @@ -36,14 +36,11 @@
"clientId": {
"type": "string"
},
"clientSecret": {
"type": "string"
},
"zip": {
"type": "string"
}
},
"required": ["refreshToken", "clientId", "clientSecret"]
"required": ["extId", "refreshToken", "clientId"]
},
"Firefox": {
"type": "object",
Expand Down
1 change: 0 additions & 1 deletion keys.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"$schema": "./keys.schema.json",
"chrome": {
"clientId": "123",
"clientSecret": "456",
"refreshToken": "789",
"extId": "abcd"
},
Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmo/bpp",
"version": "0.0.0",
"version": "1.0.0",
"private": true,
"description": "Browser Plugin Publisher",
"main": "lib/main.js",
Expand All @@ -9,7 +9,8 @@
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"package": "ncc build --license licenses.txt",
"package": "esbuild lib/main.js --platform=node --bundle --outfile=dist/index.js",
"#package-ncc": "ncc build --license license.txt",
"test": "jest",
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
},
Expand All @@ -27,23 +28,24 @@
"author": "Plasmo Corp. <[email protected]>",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.6.0"
"@actions/core": "^1.6.0",
"@plasmo-corp/web-ext-deploy": "^0.9.0"
},
"devDependencies": {
"@jest/globals": "^27.5.1",
"@types/node": "^17.0.16",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"@vercel/ncc": "^0.33.1",
"eslint": "^8.8.0",
"@types/node": "^17.0.18",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"@vercel/ncc": "^0.33.3",
"esbuild": "^0.14.22",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^26.1.0",
"eslint-plugin-jest": "^26.1.1",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.5.1",
"js-yaml": "^4.1.0",
"prettier": "2.5.1",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5",
"web-ext-deploy": "^0.7.14"
"typescript": "4.5.5"
}
}
Loading

0 comments on commit 2cc5407

Please sign in to comment.