Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEV] Update NPM packages and JS build #4144

Merged
merged 40 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fe60d98
chore: update package
Soare-Robert-Daniel Nov 15, 2023
83d4a15
chore: use sass instead of node-sass
Soare-Robert-Daniel Nov 15, 2023
57d4009
chore: use npm instead of yarn
Soare-Robert-Daniel Nov 15, 2023
07dad18
chore: eslint changes
Soare-Robert-Daniel Nov 15, 2023
ecd3590
chore: go back to yarn
Soare-Robert-Daniel Nov 15, 2023
937f941
Revert "chore: go back to yarn"
Soare-Robert-Daniel Nov 15, 2023
063eeae
chore: use node 18 for e2e
Soare-Robert-Daniel Nov 15, 2023
848c30f
chore: css optimizations
Soare-Robert-Daniel Nov 16, 2023
e439837
chore: optimize JS build
Soare-Robert-Daniel Nov 16, 2023
2eafeaa
Merge branch 'development' into dev/build
Soare-Robert-Daniel Nov 27, 2023
da60053
Merge branch 'development' into dev/build
Soare-Robert-Daniel Dec 5, 2023
6661714
Merge branch 'development' into dev/build
Soare-Robert-Daniel Jan 12, 2024
c764648
chore: jsdoc
Soare-Robert-Daniel Jan 12, 2024
7f382e1
chore: use npm for pot dist
Soare-Robert-Daniel Jan 12, 2024
5bb85b0
chore: npm cache gh action
Soare-Robert-Daniel Jan 12, 2024
e705a50
chore: use yarn for translation diff job temporarily
Soare-Robert-Daniel Jan 12, 2024
8b33492
chore: use npm
Soare-Robert-Daniel Jan 12, 2024
33f1dfd
chore: use node 16 for diff job
Soare-Robert-Daniel Jan 12, 2024
9701e9f
chore: use new sass syintax for division
Soare-Robert-Daniel Jan 16, 2024
1ca00b7
chore: bump js size
Soare-Robert-Daniel Jan 16, 2024
273cd13
chore: update packages
Soare-Robert-Daniel Jan 16, 2024
a8e3baa
Merge branch 'development' into dev/build
preda-bogdan Jan 26, 2024
857909f
Merge branch 'development' into dev/build
Soare-Robert-Daniel Jan 30, 2024
f7f7581
chore: format
Soare-Robert-Daniel Jan 30, 2024
99e0814
Merge branch 'development' into dev/build
Soare-Robert-Daniel Jan 31, 2024
2463398
chore: update test
Soare-Robert-Daniel Jan 31, 2024
e5dd08d
chore: use npm
Soare-Robert-Daniel Jan 31, 2024
4ed1902
chore: update post content order
Soare-Robert-Daniel Jan 31, 2024
90cec3d
chore: use npm cache for e2e tests CI
Soare-Robert-Daniel Jan 31, 2024
9e184a2
chore: use npm cache in all CI
Soare-Robert-Daniel Jan 31, 2024
f5ded24
Merge branch 'development' into dev/build
Soare-Robert-Daniel Feb 27, 2024
9d5bf3d
feat: active properties mangle to reduce the build size in rollup
Soare-Robert-Daniel Feb 27, 2024
05a3181
Revert "feat: active properties mangle to reduce the build size in ro…
Soare-Robert-Daniel Feb 27, 2024
c5e1de0
feat: convert simple function to arrow function with terser
Soare-Robert-Daniel Feb 27, 2024
b13cb74
Merge branch 'development' into dev/build
Soare-Robert-Daniel Mar 18, 2024
bc8b526
Merge branch 'development' into dev/build
Soare-Robert-Daniel Mar 29, 2024
45ad0ee
Merge branch 'development' into dev/build
Soare-Robert-Daniel Apr 12, 2024
7be6da0
fix: pin-down `react-sortablejs` version
Soare-Robert-Daniel Apr 23, 2024
d2c1750
Merge branch 'development' into dev/build
Soare-Robert-Daniel May 14, 2024
24410c1
Merge branch 'development' into dev/build
Soare-Robert-Daniel Jun 4, 2024
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
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ test-results
playwright-report
visual-regressions
yarn.lock
package-lock.json
.ds_store
.storybook
stories
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
],
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@wordpress/no-global-event-listener": "off"
"@wordpress/no-global-event-listener": "off",
"jsdoc/check-line-alignment": "off"
},
"settings": {
"import/parsers": {
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [14.x]
node-version: [18.x]
steps:
- uses: actions/checkout@master
with:
Expand All @@ -19,23 +19,23 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Release new version
id: release
run: |
yarn install --frozen-lockfile
npm ci
composer install --prefer-dist --no-progress --no-suggest
yarn run build
yarn run release
npm run build
npm run release
env:
CI: true
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-npm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.actor != 'pirate-bot'
strategy:
matrix:
node-version: [ 14.x ]
node-version: [ 18.x ]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ jobs:
uses: actions/checkout@v2.3.1
with:
persist-credentials: false
- name: Setup node 14
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: 18.x
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Install and Build 🔧
run: |
yarn install --frozen-lockfile
yarn run build
yarn run build-storybook
npm ci
npm run build
npm run build-storybook
cp ./.storybook/readme.md ./storybook-static/readme.md
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.6.2
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ jobs:
SSH_PATH: ${{ secrets.SSH_PATH }}
steps:
- uses: actions/checkout@master
- name: Setup node 14
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: 18.x
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Build & create dist/artifact
run: |
yarn install --frozen-lockfile
npm ci
composer install --no-dev --prefer-dist --no-progress --no-suggest
yarn run build
yarn run dist
npm run build
npm run dist
- name: Add SSH Key
run: |
mkdir $HOME/.ssh
Expand All @@ -51,8 +51,8 @@ jobs:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_KEY_ARTIFACTS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ARTIFACTS }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
SOURCE_DIR: "artifact" # optional: defaults to entire repository
DEST_DIR: ${{ secrets.AWS_PRODUCTS_FOLDER }}/$BUILD_NAME/latest
- name: Upload Tagged Version to S3
uses: jakejarvis/s3-sync-action@master
Expand All @@ -62,8 +62,8 @@ jobs:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_KEY_ARTIFACTS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ARTIFACTS }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
SOURCE_DIR: "artifact" # optional: defaults to entire repository
DEST_DIR: ${{ secrets.AWS_PRODUCTS_FOLDER }}/$BUILD_NAME/$BUILD_VERSION
- name: Send update to the store
env:
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/diff-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
pull_request:
types: [opened, edited, synchronize, ready_for_review]
branches:
- 'development'
- 'new/**'
- "development"
- "new/**"

jobs:
translation:
Expand All @@ -16,37 +16,37 @@ jobs:
uses: actions/checkout@v2
with:
path: neve-head
- name: Setup node 14
- name: Setup node 16
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- name: FRESH Makepot BASE
run: |
cd neve-head
ls languages/
composer install --no-dev --prefer-dist --no-progress --no-suggest
yarn install --frozen-lockfile
yarn run build
ls languages/
cd neve-head
ls languages/
composer install --no-dev --prefer-dist --no-progress --no-suggest
npm ci
npm run build
ls languages/
- name: Checkout Ref Head
uses: actions/checkout@v2
with:
ref: development
path: neve-base
- name: FRESH Makepot HEAD
run: |
cd neve-base
ls languages/
composer install --no-dev --prefer-dist --no-progress --no-suggest
yarn install --frozen-lockfile
yarn run build
ls languages/
cd neve-base
ls languages/
composer install --no-dev --prefer-dist --no-progress --no-suggest
yarn install --frozen-lockfile
yarn run build
ls languages/
- name: Find Comment
uses: peter-evans/find-comment@v1
id: find_coomment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'pirate-bot'
comment-author: "pirate-bot"
body-includes: PR has POT difference
- name: Install PODiff
run: |
Expand All @@ -72,4 +72,4 @@ jobs:
teams:
- "admin-neve"
status: Has translation changes, a review admin-neve team is required
token: ${{ secrets.BOT_TOKEN }}
token: ${{ secrets.BOT_TOKEN }}
36 changes: 18 additions & 18 deletions .github/workflows/e2e-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
pull_request:
types: [opened, synchronize, ready_for_review]
branches-ignore:
- 'update_dependencies'
- "update_dependencies"
paths:
- '.storybook/**'
- 'e2e-tests/**'
- '.github/e2e-storybook.yml'
- 'package.json'
- 'stories/**'
- ".storybook/**"
- "e2e-tests/**"
- ".github/e2e-storybook.yml"
- "package.json"
- "stories/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
Expand All @@ -25,27 +25,27 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Setup node 14
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: 18.x
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Build Cypress
working-directory: ./e2e-tests
run: yarn install --frozen-lockfile
run: npm ci
- name: Start Storybook
run: |
yarn install --frozen-lockfile
yarn run build
npm ci
npm run build
yarn storybook &
- name: Run Storybook Cypress tests 🚀 - ${{ matrix.container }}
env:
Expand Down
46 changes: 28 additions & 18 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and test Playwright

on:
pull_request:
types: [ opened, synchronize, ready_for_review ]
types: [opened, synchronize, ready_for_review]
branches-ignore:
- "update_dependencies"

Expand All @@ -20,20 +20,20 @@ jobs:
steps:
- name: Check out source files
uses: actions/checkout@v2
- name: Setup node 14
- name: Setup node 18
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: 18.x
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -47,12 +47,12 @@ jobs:
${{ runner.os }}-composer-
- name: Install composer deps
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: Install yarn deps
run: yarn install --frozen-lockfile
- name: Install NPM deps
run: npm ci
- name: Build files
run: yarn run build
run: npm run build
- name: Create zip
run: yarn run dist
run: npm run dist
- name: Retrieve branch name
id: retrieve-branch-name
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
Expand Down Expand Up @@ -150,18 +150,28 @@ jobs:
ZIP_URL: "https://verti-artifacts.s3.amazonaws.com/${{ github.event.pull_request.base.repo.name }}-${{ needs.dev-zip.outputs.branch-name }}-${{ needs.dev-zip.outputs.git-sha-8 }}/neve.zip"
steps:
- uses: actions/checkout@v3
- name: Setup node 16
- name: Setup node 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install ${{ matrix.envs }} env for ${{ matrix.specs }} specs
run: bash ./bin/envs/init.sh ${{ matrix.envs }} latest no "$ZIP_URL"
- name: Install dependencies
run: yarn
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: yarn run test:playwright e2e-tests/specs/${{ matrix.specs }}
run: npm run test:playwright e2e-tests/specs/${{ matrix.specs }}
- name: Upload trace file
if: failure()
uses: actions/upload-artifact@v3
Expand Down
Loading
Loading