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

🔧 Move from npm to pnpm #257

Merged
merged 3 commits into from
Aug 8, 2023
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
14 changes: 10 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ jobs:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Install dependencies
run: npm install
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Build the package
run: npm run build
run: pnpm run build

run-unit-tests:
name: Test on Node ${{ matrix.node_version }}
Expand All @@ -49,10 +52,13 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Run unit tests (with experimental VM modules)
run: npm test
run: pnpm run test

trufflehog:
name: TruffleHog
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ jobs:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Install dependencies
run: npm install
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Build the package
run: npm run build
run: pnpm run build

- name: Publish Vue 2 package to npm registry
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish-vue2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ jobs:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Install dependencies
run: npm install
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Build the package
run: npm run build
run: pnpm run build

- name: Publish to npm registry
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish-vue3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ jobs:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Install dependencies
run: npm install
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Build the package
run: npm run build
run: pnpm run build

- name: Publish to npm registry
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.idea/
.cache/
.pnpm-store/

.env

Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
43 changes: 0 additions & 43 deletions .storybook/main.ts

This file was deleted.

8 changes: 0 additions & 8 deletions .storybook/manager.ts

This file was deleted.

14 changes: 0 additions & 14 deletions .storybook/preview-styles.scss

This file was deleted.

1 change: 0 additions & 1 deletion .storybook/static/adyen-storybook.svg

This file was deleted.

4 changes: 2 additions & 2 deletions build/postbuild.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { existsSync } from 'fs';
import { appendFile, mkdir, readFile, rm, writeFile } from 'fs/promises';
import glob from 'glob';
import { compile } from 'sass';
import sass from 'sass';

const COMPONENT_STYLE_COMMENT = '\n/** Lume component styles */\n';

Expand All @@ -27,7 +27,7 @@ async function run() {

try {
// Compile main.scss to CSS
const mainCompileResult = compile(
const mainCompileResult = sass.compile(
'../lib/src/styles/main.scss',
sassCompilerOptions
);
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ services:
context: .
args:
docker_image: $DOCKER_IMAGE
ports:
- '9002:9002' # Vue 2 Storybook
- '9003:9003' # Vue 3 Storybook
volumes:
- ./:/home/node/lume
32 changes: 0 additions & 32 deletions nx.json

This file was deleted.

53 changes: 7 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
"version": "0.8.0",
"description": "Lume is a component library for visual representations of data, built for Vue with D3.",
"type": "module",
"workspaces": [
"packages/lib",
"packages/vue2",
"packages/vue3"
],
"license": "MIT",
"contributors": [
{
Expand All @@ -32,66 +27,32 @@
"url": "https://github.com/Adyen/lume.git"
},
"scripts": {
"build": "nx run-many --target=build",
"build:storybook": "NODE_ENV=production build-storybook -c .storybook -o storybook",
"build": "pnpm --parallel -r --filter='./packages/*' run build",
"build:storybook": "NODE_ENV=production pnpm --filter='./packages/vue3' run build:storybook -o ../../storybook",
"confighooks": "git config core.hooksPath ./git-hooks",
"prepare": "npm run confighooks && echo \" ✔ Git hooks path configured to ./git-hooks\"",
"pack": "pnpm -r --filter='./packages/vue*' run pack",
"prepare": "pnpm run confighooks && echo \" ✔ Git hooks path configured to ./git-hooks\"",
"release": "release-it",
"storybook": "start-storybook -p 9001 -c .storybook",
"test": "nx test lib",
"test:watch": "nx test:watch lib",
"test:update:snapshot": "nx test:update:snapshot lib",
"test:coverage": "nx test:coverage lib"
},
"dependencies": {
"@popperjs/core": "^2.11.4",
"d3": "7.8.4",
"d3-sankey": "0.12.3"
"storybook": "pnpm --parallel -r --filter='./packages/*' run storybook",
"test": "pnpm --filter='./packages/vue3' run test"
},
"devDependencies": {
"@release-it-plugins/workspaces": "^3.2.0",
"@storybook/addon-a11y": "^6.5.12",
"@storybook/addon-essentials": "^6.5.12",
"@storybook/addon-storysource": "^6.5.12",
"@storybook/addons": "^6.5.12",
"@storybook/builder-webpack5": "^6.5.12",
"@storybook/manager-webpack5": "^6.5.12",
"@storybook/theming": "^6.5.12",
"@storybook/vue3": "^6.5.12",
"@types/d3": "^7.4.0",
"@types/d3-sankey": "^0.12.0",
"@types/jest": "^29.2.2",
"@types/node": "^18.11.5",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.43.0",
"@vitest/coverage-istanbul": "^0.30.0",
"@vue/test-utils": "^2.3.0",
"auto-changelog": "^2.4.0",
"css-loader": "^6.7.2",
"eslint": "^8.27.0",
"eslint-plugin-vue": "^9.9.0",
"glob": "^8.0.3",
"html-webpack-plugin": "^5.5.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jsdom": "^20.0.3",
"mini-css-extract-plugin": "^2.7.0",
"nx": "14.8.2",
"prettier": "^2.7.1",
"release-it": "^15.6.0",
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.63.3",
"sass": "^1.62.1",
"sass-loader": "^13.2.0",
"storybook-addon-designs": "^6.2.1",
"ts-jest": "^29.0.3",
"typescript": "^4.6.3",
"vite": "^4.0.0",
"vite-plugin-static-copy": "^0.14.0",
"vitest": "^0.30.0",
"vue": "^3.2.47",
"vue-loader": "^15.10.0",
"vue-style-loader": "^4.1.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0"
},
Expand Down
22 changes: 13 additions & 9 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"name": "@adyen/lume-core",
"version": "*",
"version": "0.8.0",
govind-srinidhi marked this conversation as resolved.
Show resolved Hide resolved
"description": "",
"private": true,
"main": "index.js",
"directories": {
"test": "test"
},
"exports": {
".": "./src/index.ts",
"./plugin": "./src/plugin.ts",
Expand All @@ -14,11 +12,17 @@
"scripts": {
"lint:fix": "npm run lint -- --fix",
"lint:pretty": "prettier --write --ignore-unknown .",
"lint": "eslint ./src ./test --ext .js,.ts,.vue",
"test": "vitest run --config=vitest.config.ts --silent",
"test:watch": "vitest --config=vitest.config.ts",
"test:update:snapshot": "vitest --config=vitest.config.ts -u",
"test:coverage": "vitest run --coverage"
"lint": "eslint ./src ./test --ext .js,.ts,.vue"
},
"dependencies": {
"@popperjs/core": "^2.11.4",
"d3": "7.8.0",
"d3-sankey": "0.12.3"
},
"devDependencies": {
"@storybook/addon-actions": "7.2.1",
"@vue/test-utils": "^2.3.2",
"vitest": "^0.32.0"
},
"keywords": [],
"author": "",
Expand Down
5 changes: 0 additions & 5 deletions packages/lib/project.json

This file was deleted.

26 changes: 0 additions & 26 deletions packages/lib/vitest.config.ts

This file was deleted.

13 changes: 13 additions & 0 deletions packages/storybook-utils/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading