Skip to content

Commit 57ae803

Browse files
Merge branch 'main' of github.com:storyblok/field-plugin
2 parents d106b7f + a90d0b5 commit 57ae803

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+904
-1190
lines changed

.github/actions/cli-checks-env/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ runs:
1212
shell: bash
1313
- run: yarn install
1414
shell: bash
15-
- run: yarn workspace @storyblok/field-plugin build
15+
- run: yarn build:lib
1616
shell: bash
1717
- run: cd packages/field-plugin && npm link
1818
shell: bash
19-
- run: yarn workspace @storyblok/field-plugin-cli build
19+
- run: yarn build:cli
2020
shell: bash

.github/workflows/ci-cli.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@ jobs:
1818
- run: |
1919
yarn workspace @storyblok/field-plugin-cli test
2020
yarn workspace @storyblok/manifest-helper test
21-
- run: yarn workspace @storyblok/field-plugin-cli build
21+
- run: yarn build:cli
2222
standalone-vue2:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v3
2626
- name: Prepare test environment
2727
uses: ./.github/actions/cli-checks-env
28-
- run: npx field-plugin --dir=${{runner.temp}} --pluginName=temp-single-field-plugin --template=vue2 --structure=standalone --packageManager=npm
28+
- run: yarn dev:cli --dir=${{runner.temp}} --pluginName=temp-single-field-plugin --template=vue2 --structure=standalone --packageManager=npm
2929
- run: cd ${{runner.temp}}/temp-single-field-plugin && npm link @storyblok/field-plugin && npm run build
3030
standalone-vue3:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- uses: actions/checkout@v3
3434
- name: Prepare test environment
3535
uses: ./.github/actions/cli-checks-env
36-
- run: npx field-plugin --dir=${{runner.temp}} --pluginName=temp-single-field-plugin --template=vue3 --structure=standalone --packageManager=npm
36+
- run: yarn dev:cli --dir=${{runner.temp}} --pluginName=temp-single-field-plugin --template=vue3 --structure=standalone --packageManager=npm
3737
- run: cd ${{runner.temp}}/temp-single-field-plugin && npm link @storyblok/field-plugin && npm run build
3838
standalone-react:
3939
runs-on: ubuntu-latest
4040
steps:
4141
- uses: actions/checkout@v3
4242
- name: Prepare test environment
4343
uses: ./.github/actions/cli-checks-env
44-
- run: npx field-plugin --dir=${{runner.temp}} --pluginName=temp-single-field-plugin --template=react --structure=standalone --packageManager=npm
44+
- run: yarn dev:cli --dir=${{runner.temp}} --pluginName=temp-single-field-plugin --template=react --structure=standalone --packageManager=npm
4545
- run: cd ${{runner.temp}}/temp-single-field-plugin && npm link @storyblok/field-plugin && npm run build
4646
monorepo-vue2:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- uses: actions/checkout@v3
5050
- name: Prepare test environment
5151
uses: ./.github/actions/cli-checks-env
52-
- run: npx field-plugin --dir=${{runner.temp}} --repoName=temp-monorepo-field-plugin --pluginName=test-plugin --template=vue2 --structure=monorepo --packageManager=npm
52+
- run: yarn dev:cli --dir=${{runner.temp}} --repoName=temp-monorepo-field-plugin --pluginName=test-plugin --template=vue2 --structure=monorepo --packageManager=npm
5353
env:
5454
YARN_ENABLE_IMMUTABLE_INSTALLS: false
5555
- run: cd ${{runner.temp}}/temp-monorepo-field-plugin && npm link @storyblok/field-plugin && npm run build --workspace=test-plugin
@@ -59,7 +59,7 @@ jobs:
5959
- uses: actions/checkout@v3
6060
- name: Prepare test environment
6161
uses: ./.github/actions/cli-checks-env
62-
- run: npx field-plugin --dir=${{runner.temp}} --repoName=temp-monorepo-field-plugin --pluginName=test-plugin --template=vue3 --structure=monorepo --packageManager=npm
62+
- run: yarn dev:cli --dir=${{runner.temp}} --repoName=temp-monorepo-field-plugin --pluginName=test-plugin --template=vue3 --structure=monorepo --packageManager=npm
6363
env:
6464
YARN_ENABLE_IMMUTABLE_INSTALLS: false
6565
- run: cd ${{runner.temp}}/temp-monorepo-field-plugin && npm link @storyblok/field-plugin && cd packages/test-plugin && npx vite build
@@ -69,7 +69,7 @@ jobs:
6969
- uses: actions/checkout@v3
7070
- name: Prepare test environment
7171
uses: ./.github/actions/cli-checks-env
72-
- run: npx field-plugin --dir=${{runner.temp}} --repoName=temp-monorepo-field-plugin --pluginName=test-plugin --template=react --structure=monorepo --packageManager=npm
72+
- run: yarn dev:cli --dir=${{runner.temp}} --repoName=temp-monorepo-field-plugin --pluginName=test-plugin --template=react --structure=monorepo --packageManager=npm
7373
env:
7474
YARN_ENABLE_IMMUTABLE_INSTALLS: false
7575
- run: cd ${{runner.temp}}/temp-monorepo-field-plugin && npm link @storyblok/field-plugin && npm run build --workspace=test-plugin

.github/workflows/ci-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
yarn workspace @storyblok/field-plugin test
2828
yarn workspace @storyblok/manifest-helper test
2929
- name: Build
30-
run: yarn workspace @storyblok/field-plugin build
30+
run: yarn build:lib

.github/workflows/npm-publish-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
registry-url: 'https://registry.npmjs.org'
2020
- run: yarn install --immutable
2121
- name: Build the CLI
22-
run: yarn workspace @storyblok/field-plugin-cli build
22+
run: yarn build:cli
2323
- name: Publish the package to NPM
2424
run: ./scripts/publish.ts cli
2525
env:

.github/workflows/npm-publish-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
registry-url: 'https://registry.npmjs.org'
2020
- run: yarn install --immutable
2121
- name: Build the library
22-
run: yarn workspace @storyblok/field-plugin build
22+
run: yarn build:lib
2323
- name: Copy the root's readme file
2424
run: cp README.md packages/field-plugin/
2525
- name: Publish the package to NPM

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
node_modules
33
dist
44
packages/*/dist
5+
**/.turbo/
56

67
# local env files
78
.env.local
@@ -44,4 +45,4 @@ packages/cli/templates/**/.yarn/*
4445
!packages/cli/templates/**/.yarn/plugins
4546
!packages/cli/templates/**/.yarn/releases
4647
!packages/cli/templates/**/.yarn/sdks
47-
!packages/cli/templates/**/.yarn/versions
48+
!packages/cli/templates/**/.yarn/versions

.yarnrc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
defaultSemverRangePrefix: ""
1+
defaultSemverRangePrefix: ''
22

33
nodeLinker: node-modules
44

55
plugins:
66
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
7-
spec: "@yarnpkg/plugin-workspace-tools"
7+
spec: '@yarnpkg/plugin-workspace-tools'
88

99
yarnPath: .yarn/releases/yarn-3.2.4.cjs
10+
11+
nmHoistingLimits: workspaces

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ To test the CLI, make any changes under `packages/cli` and then run the followin
9393
yarn build:cli
9494
```
9595

96-
To test the local version of the CLI, run `npx field-plugin <command>`. It is recommended to test the CLI outside of the Field Plugin SDK repository. To do this, run the following:
96+
To test the local version of the CLI, run `yarn dev:cli <command>`. It is recommended to test the CLI outside of the Field Plugin SDK repository. To do this, run the following:
9797

9898
```sh
99-
npx field-plugin create --dir ../<SOME-TEST-DIRECTORY>
99+
yarn dev:cli create --dir ../<SOME-TEST-DIRECTORY>
100100
```
101101

102102
A plugin will be created under the test directory.

eslint.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ export default [
5858
],
5959
'react/prop-types': 'off',
6060
'vue/multi-word-component-names': 'off',
61+
'vue/html-self-closing': 'off',
62+
},
63+
},
64+
{
65+
files: ['packages/cli/templates/vue2/**'],
66+
rules: {
67+
'vue/require-prop-types': 'off',
6168
},
6269
},
6370
]

package.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"workspaces": [
1313
"packages/*",
1414
"packages/cli/templates/*",
15-
"packages/field-plugin/helpers/*"
15+
"packages/lib-helpers/*"
1616
],
1717
"engines": {
1818
"yarn": "^3.2.4"
@@ -21,11 +21,11 @@
2121
"main": "dist/index.js",
2222
"type": "module",
2323
"scripts": {
24-
"postinstall": "yarn build:lib && yarn prepare-dev-configs",
25-
"build": "yarn build:lib && yarn workspaces foreach --exclude @storyblok/field-plugin run build",
26-
"build:lib": "yarn workspace @storyblok/field-plugin build",
27-
"build:cli": "yarn workspace @storyblok/field-plugin-cli build",
28-
"build:sandbox": "yarn build:lib && yarn workspace sandbox build",
24+
"postinstall": "yarn build && yarn prepare-dev-configs",
25+
"build": "turbo run build",
26+
"build:lib": "turbo run build --filter=./packages/field-plugin",
27+
"build:cli": "turbo run build --filter=./packages/cli",
28+
"build:sandbox": "turbo run build --filter=./packages/sandbox",
2929
"prepare-dev-configs": "./scripts/prepare-dev-vite-configs.mjs",
3030
"test": "yarn test:lib",
3131
"test:lib": "yarn workspace @storyblok/field-plugin test",
@@ -35,6 +35,7 @@
3535
"check:types": "yarn workspaces foreach run check:types",
3636
"lint": "eslint .",
3737
"dev:demo": "yarn workspace demo dev",
38+
"dev:cli": "yarn workspace @storyblok/field-plugin-cli dev",
3839
"dev:lib": "yarn workspace @storyblok/field-plugin dev",
3940
"dev:sandbox": "yarn workspace sandbox dev",
4041
"dev:template": "yarn workspace field-plugin-${0}-template dev --config node_modules/.${0}-vite.config.ts",
@@ -48,24 +49,25 @@
4849
"bump-version": "./scripts/bump-version.ts"
4950
},
5051
"devDependencies": {
51-
"@eslint/js": "9.11.0",
52+
"@eslint/js": "9.11.1",
5253
"@storyblok/mui": "0.2.0",
53-
"@types/node": "18.19.17",
54-
"eslint": "9.11.0",
54+
"@types/node": "18.19.54",
55+
"eslint": "8.57.1",
5556
"eslint-config-prettier": "9.1.0",
56-
"eslint-plugin-react": "7.36.1",
57+
"eslint-plugin-react": "7.37.0",
5758
"eslint-plugin-react-hooks": "4.6.2",
5859
"eslint-plugin-react-refresh": "0.4.12",
5960
"eslint-plugin-vue": "9.28.0",
6061
"globals": "15.9.0",
6162
"kleur": "4.1.5",
62-
"prettier": "^3.2.5",
63+
"prettier": "^3.3.3",
6364
"prompts": "2.4.2",
64-
"semver": "7.6.0",
65+
"semver": "7.6.3",
6566
"tsx": "3.14.0",
66-
"typescript": "^5.3.3",
67-
"typescript-eslint": "8.6.0",
68-
"vite": "5.1.3",
67+
"turbo": "2.1.3",
68+
"typescript": "5.6.2",
69+
"typescript-eslint": "8.8.0",
70+
"vite": "5.4.8",
6971
"vite-plugin-dts": "1.7.3",
7072
"vue-eslint-parser": "9.4.3",
7173
"zx": "7.2.3"

0 commit comments

Comments
 (0)