Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

chore: strip test ids on production builds #82

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ module.exports = {
},
],
],
env: {
production: {
plugins: ["babel-plugin-jsx-remove-data-test-id"],
},
},
};
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Build
run: yarn build
run: yarn build:dev

- name: Test
run: yarn test
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"prebuild": "npx [email protected] node_modules/@dekk-app/dekk-backend/src/colonies/prisma/client/query-engine-darwin node_modules/@dekk-app/dekk-backend/src/colonies/prisma/client/query-engine-debian-openssl-1.1.x",
"build": "next build",
"build:dev": "npx [email protected] NODE_ENV=development next build",
"build:analyze": "npx [email protected] ANALYZE=true next build",
"cypress:run": "npx [email protected] run --record",
"cypress:run:firefox": "npx [email protected] run --record --browser firefox",
Expand Down Expand Up @@ -96,6 +97,7 @@
"@types/uuid": "^8.3.1",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
"cypress-cucumber-preprocessor": "^4.2.0",
"dotenv": "^10.0.0",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3409,6 +3409,11 @@ babel-plugin-dynamic-import-node@^2.3.3:
dependencies:
object.assign "^4.1.0"

babel-plugin-jsx-remove-data-test-id@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-jsx-remove-data-test-id/-/babel-plugin-jsx-remove-data-test-id-3.0.0.tgz#15c95f97ce0ff60d72b29e403bde245f86393288"
integrity sha512-E4uM/LIUizjy2Z5tVAfa8pSXsYgoKWJ97kzuEMfsIxSLSNDWsAhgFVPkgNuakViX5dkNjw1DKIi0VpWP6djqbw==

babel-plugin-macros@^2.6.1:
version "2.8.0"
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138"
Expand Down