diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3d9f6d..3cdf8c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,4 +75,4 @@ jobs: - env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build - - run: npm run test -- --testPathIgnorePatterns ".*playwright.*" + - run: npm run test:noplaywright diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ce07f9b..a3eacbe 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,7 +26,7 @@ jobs: node-version: '18' # Align the version of Node here with ci.yml. registry-url: 'https://registry.npmjs.org' - run: npm ci --no-fund # Will also (via `prepare` hook): 1. install ./app, 2. build - - run: npm run test -- --testPathIgnorePatterns ".*playwright.*" + - run: npm run test:noplaywright - run: npm run lint - run: npm publish env: diff --git a/Dockerfile b/Dockerfile index 4b0f59e..baad1f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ RUN find ./icon-scripts ./src ./app -type f -print0 | xargs -0 dos2unix # Cleanup leftover files in this step to not waste Docker layer space # Make sure nativefier is executable RUN npm link \ - && npm test \ + && npm run test:noplaywright \ && rm -rf /tmp/nativefier* ~/.npm/_cacache ~/.cache/electron \ && chmod +x $NPM_PACKAGES/bin/nativefier diff --git a/package.json b/package.json index e46e6cb..b8fc9ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nativefier", - "version": "47.1.1", + "version": "47.0.0", "description": "Wrap web apps natively", "license": "MIT", "author": "Goh Jia Hao", @@ -43,10 +43,13 @@ "lint": "eslint shared app src --ext .ts", "list-outdated-deps": "npm out; cd app && npm out; true", "prepare": "cd app && npm ci && cd .. && npm run build", - "relock": "rm -rf ./node_modules/ ./app/node_modules/ ./npm-shrinkwrap.json ./app/npm-shrinkwrap.json && npm install --ignore-scripts --package-lock && mv package-lock.json npm-shrinkwrap.json && npm out; cd app && npm install --ignore-scripts --package-lock && mv package-lock.json npm-shrinkwrap.json && npm out", + "relock:cli": "rm -rf ./node_modules/ ./npm-shrinkwrap.json && npm install --ignore-scripts --package-lock && mv package-lock.json npm-shrinkwrap.json && npm out", + "relock:app": "rm -rf ./app/node_modules/ ./app/npm-shrinkwrap.json && cd app && npm install --ignore-scripts --package-lock && mv package-lock.json npm-shrinkwrap.json && npm out", + "relock": "npm run relock:cli; npm run relock:app", "test:integration": "jest --testRegex '.*integration-test.js'", "test:manual": "npm run build && bash .github/manual-test", "test:playwright": "jest --detectOpenHandles --testRegex '.*playwright-test.js'", + "test:noplaywright": "jest --testRegex '[-.]test\\.js$' --testPathIgnorePatterns '.*playwright.*'", "test:unit": "jest", "test:watch": "echo 'Remember to run npm run build:watch for the test watcher to work!' && jest --watchAll --collectCoverage=false", "test:withlog": "LOGLEVEL=trace npm run test", @@ -69,10 +72,10 @@ "yargs": "^17.1.1" }, "devDependencies": { + "@jest/types": "^28.0.2", "@types/debug": "^4.1.6", "@types/fs-extra": "^9.0.13", "@types/hasbin": "^1.2.0", - "@types/jest": "^27.0.1", "@types/ncp": "^2.0.5", "@types/node": "14.14.20", "@types/page-icon": "^0.3.4", @@ -83,7 +86,7 @@ "eslint": "^8.1.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "jest": "^27.0.6", + "jest": "^28.0.3", "playwright": "^1.21.1", "prettier": "^2.3.2", "rimraf": "^3.0.2",