Skip to content

Commit

Permalink
Merge pull request #99 from marcomontalbano/bump-nodejs
Browse files Browse the repository at this point in the history
Bump nodejs to 12.22
  • Loading branch information
marcomontalbano committed Dec 13, 2021
2 parents 038303f + 2104a68 commit 5a18535
Show file tree
Hide file tree
Showing 78 changed files with 13,858 additions and 8,414 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/dist/*
**/node_modules/*
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = {
files: ['**.test.ts'],
rules: {
'import/no-extraneous-dependencies': 'off',
'import/no-relative-packages': 'off',
},
},
],
Expand Down
14 changes: 12 additions & 2 deletions .figmaexportrc.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,18 @@ module.exports = {
transformers: [
require('@figma-export/transform-svg-with-svgo')({
plugins: [
{ removeViewBox: false },
{ removeDimensions: true }
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
}
}
},
{
name: 'removeDimensions',
active: true
}
]
})
],
Expand Down
21 changes: 17 additions & 4 deletions .figmaexportrc.example.local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,18 @@ const componentOptions: ComponentsCommandOptions = {
transformers: [
transformSvgWithSvgo({
plugins: [
{ removeViewBox: false },
{ removeDimensions: true }
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
}
}
},
{
name: 'removeDimensions',
active: true
}
]
})
],
Expand All @@ -53,13 +63,16 @@ const componentOptions: ComponentsCommandOptions = {
outputComponentsAsSvgr({
output: './output/components/svgr',
getSvgrConfig: () => ({

template: ({ componentName, props, jsx, exports }, { tpl }) => tpl`
const ${componentName} = (${props}) => (${jsx});
${exports}
`
})
}),
outputComponentsAsSvgstore({
output: './output/components/svgstore',
svgstoreConfig: {

}
})
]
Expand Down
14 changes: 12 additions & 2 deletions .figmaexportrc.example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,18 @@ const componentOptions: ComponentsCommandOptions = {
transformers: [
transformSvgWithSvgo({
plugins: [
{ removeViewBox: false },
{ removeDimensions: true }
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
}
}
},
{
name: 'removeDimensions',
active: true
}
]
})
],
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ jobs:
node-version: 14.x

- name: Install 📦
run: yarn --frozen-lockfile
run: yarn --immutable

- name: Build 🛠
run: yarn build

- name: Publish 🚀 PRERELEASE
if: 'github.event.release.prerelease'
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
./node_modules/.bin/lerna publish from-git --dist-tag next --require-scripts --yes
yarn publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Publish 🚀 PRODUCTION
if: '!github.event.release.prerelease'
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
./node_modules/.bin/lerna publish from-git --require-scripts --yes
yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node: [10.13.0, 10.x, 12.x, 14.x, 15.x, 16.x]
node: [12.22.0, 12.x, 14.x, 16.x]

steps:
- name: Checkout 🛎️
Expand All @@ -26,7 +26,7 @@ jobs:
node-version: ${{ matrix.node }}

- name: Install 📦
run: yarn --frozen-lockfile
run: yarn --immutable

- name: Lint 🔍
run: yarn lint
Expand All @@ -46,10 +46,10 @@ jobs:
- name: Node 🧰
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install 📦
run: yarn --frozen-lockfile
run: yarn --immutable

- name: Coverage 🌈
run: yarn coverage
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
# node-version: 14.x

# - name: Install 📦
# run: yarn --frozen-lockfile
# run: yarn --immutable

# - name: Stryker 👾
# run: yarn stryker
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@ coverage
.nyc_output
lerna-debug.log
.changelog
package.json.lerna_backup

/output
**/dist
*.tsbuildinfo
.parcel-cache

/.figmaexportrc.js
/.figmaexportrc.ts

# YARN
yarn-error.log
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.13
12.22.0
550 changes: 550 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

768 changes: 768 additions & 0 deletions .yarn/releases/yarn-3.1.1.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"

yarnPath: .yarn/releases/yarn-3.1.1.cjs
27 changes: 0 additions & 27 deletions lerna.json

This file was deleted.

88 changes: 50 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
"private": true,
"license": "MIT",
"description": "Export tool for Figma",
"workspaces": {
"packages": [
"packages/*"
]
},
"repository": {
"type": "git",
"url": "https://github.com/marcomontalbano/figma-export"
},
"scripts": {
"prepare": "husky install",
"predebug": "yarn build",
"debug": "ts-node ./packages/cli/bin/run use-config .figmaexportrc.ts",
"debug": "yarn build && ts-node ./packages/cli/bin/run use-config .figmaexportrc.ts",
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('You must use Yarn to install, not NPM')\"",
"postinstall": "husky install",
"clean": "rm -rf node_modules/ output/ */*/node_modules */*/output */*/dist */*/tsconfig.tsbuildinfo",
"postinstall": "lerna bootstrap",
"build": "tsc --build packages/**/tsconfig.json",
"prepublish": "yarn build",
"lint": "eslint . --ignore-pattern=node_modules --ignore-pattern=output --ignore-pattern=dist --ext .js,.ts",
"pretest": "yarn build",
"test": "TS_NODE_PROJECT='./tsconfig.mocha.json' mocha",
"lint": "yarn build && eslint . --ignore-pattern=node_modules --ignore-pattern=output --ignore-pattern=dist --ext .js,.jsx,.ts",
"test": "yarn build && TS_NODE_PROJECT='./tsconfig.mocha.json' mocha",
"test:watch": "yarn test --watch --reporter=dot",
"coverage": "nyc yarn test --reporter=dot",
"coverage:watch": "npx nodemon -e js,mjs,ts --exec yarn coverage",
"prewebsite:start": "yarn build",
"website:start": "lerna run --scope @figma-export/website start --stream",
"prewebsite:build": "lerna bootstrap --force-local",
"website:build": "lerna run --scope @figma-export/website build --stream",
"website:serve": "lerna run --scope @figma-export/website serve --stream",
"lerna:version": "lerna version",
"lerna:ncu": "npx lerna exec 'npx npm-check-updates -u' --stream",
"website:start": "yarn build && yarn workspace @figma-export/website start",
"website:build": "yarn build && yarn workspace @figma-export/website build",
"website:serve": "yarn workspace @figma-export/website serve",
"upgrade:major": "yarn workspaces foreach -iv exec npx npm-check-updates -u",
"upgrade:minor": "yarn upgrade:major --target minor",
"publish": "yarn workspaces foreach npm publish --tolerate-republish --access public",
"pre-commit": "lint-staged -c ./lint-staged.config.js"
},
"author": "Marco Montalbano <me@marcomontalbano.com>",
Expand All @@ -40,37 +40,49 @@
]
},
"devDependencies": {
"@types/chai": "~4.2.21",
"@parcel/packager-raw-url": "^2.0.1",
"@parcel/transformer-sass": "^2.0.1",
"@parcel/transformer-webmanifest": "^2.0.1",
"@types/chai": "~4.3.0",
"@types/chai-as-promised": "^7.1.4",
"@types/chai-things": "0.0.35",
"@types/mocha": "~8.2.3",
"@types/node": "~14.17.15",
"@types/sinon": "~9.0.11",
"@types/sinon-chai": "~3.2.5",
"@typescript-eslint/eslint-plugin": "~4.31.0",
"@typescript-eslint/parser": "~4.31.0",
"@types/mocha": "~9.0.0",
"@types/node": "~16.11.12",
"@types/sinon": "~10.0.6",
"@types/sinon-chai": "~3.2.6",
"@typescript-eslint/eslint-plugin": "~5.6.0",
"@typescript-eslint/parser": "~5.6.0",
"chai": "~4.3.4",
"chai-as-promised": "^7.1.1",
"chai-things": "~0.2.0",
"eslint": "~7.32.0",
"eslint-config-airbnb-base": "~14.2.1",
"eslint-config-developit": "~1.2.0",
"eslint": "~8.4.1",
"eslint-config-airbnb": "~19.0.2",
"eslint-plugin-chai-friendly": "~0.7.2",
"eslint-plugin-import": "~2.24.2",
"husky": "~6.0.0",
"lerna": "~3.22.1",
"lerna-changelog": "~1.0.1",
"lint-staged": "~10.5.4",
"mocha": "~8.4.0",
"nock": "~13.1.3",
"eslint-plugin-import": "~2.25.3",
"husky": "^7.0.4",
"lerna-changelog": "~2.2.0",
"lint-staged": "~12.1.2",
"mocha": "~9.1.3",
"nock": "~13.2.1",
"nyc": "~15.1.0",
"sinon": "~9.2.4",
"sinon": "~12.0.1",
"sinon-chai": "~3.7.0",
"ts-node": "~9.1.1",
"typescript": "~4.4.3"
"ts-node": "~10.4.0",
"typescript": "~4.5.3"
},
"dependencies": {},
"engines": {
"node": ">= 10.13"
}
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"changelog": {
"cacheDir": ".changelog",
"labels": {
"PR: Beauty :nail_care:": ":nail_care: Beauty",
"PR: Bug Fix :bug:": ":bug: Bug Fix",
"PR: Dependencies :up:": ":up: Dependencies",
"PR: Documentation :memo:": ":memo: Documentation",
"PR: Internal :house:": ":house: Internal",
"PR: New Feature :rocket:": ":rocket: New Feature"
}
},
"packageManager": "yarn@3.1.1"
}
6 changes: 3 additions & 3 deletions packages/cli/bin/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

require('@oclif/command').run()
.then(require('@oclif/command/flush'))
.catch(require('@oclif/errors/handle'));
require('@oclif/core').run()
.then(require('@oclif/core/flush'))
.catch(require('@oclif/core/handle'));
12 changes: 5 additions & 7 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@
"dependencies": {
"@figma-export/core": "^3.5.0",
"@figma-export/types": "^3.5.0",
"@oclif/command": "~1.8.0",
"@oclif/config": "~1.17.0",
"@oclif/errors": "~1.3.5",
"@oclif/plugin-help": "~3.2.3",
"@oclif/core": "~1.0.10",
"@oclif/plugin-help": "~3.2.17",
"ora": "~5.4.1"
},
"devDependencies": {
"@oclif/dev-cli": "~1.26.0",
"@oclif/test": "~1.2.8",
"@oclif/dev-cli": "~1.26.9",
"@oclif/test": "~2.0.3",
"globby": "~11.0.4"
},
"engines": {
"node": ">= 10.13"
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"files": [
"/bin",
Expand Down
Loading

0 comments on commit 5a18535

Please sign in to comment.