playroom 0.28.0 → 0.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +0 -6
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.github/workflows/preview-site.yml +12 -8
- package/.github/workflows/release.yml +17 -11
- package/.github/workflows/snapshot.yml +35 -0
- package/.github/workflows/validate.yml +35 -8
- package/.husky/pre-commit +4 -0
- package/.nvmrc +1 -1
- package/CHANGELOG.md +26 -0
- package/README.md +2 -0
- package/cypress/{integration/editor.js → e2e/editor.cy.js} +0 -0
- package/cypress/{integration/scope.js → e2e/scope.cy.js} +0 -0
- package/cypress/{integration/smoke.js → e2e/smoke.cy.js} +8 -4
- package/cypress/{integration/snippets.js → e2e/snippets.cy.js} +0 -0
- package/cypress/{integration/toolbar.js → e2e/toolbar.cy.js} +0 -0
- package/cypress/{integration/urlHandling.js → e2e/urlHandling.cy.js} +0 -0
- package/cypress/support/{index.js → e2e.js} +0 -0
- package/cypress/support/utils.js +8 -3
- package/cypress.config.ts +7 -0
- package/lib/build.js +1 -1
- package/lib/makeWebpackConfig.js +27 -0
- package/package.json +89 -107
- package/src/Playroom/CodeEditor/CodeEditor.tsx +29 -33
- package/src/Playroom/CodeEditor/CodeMirror2.tsx +748 -0
- package/src/Playroom/Frame.tsx +3 -3
- package/src/Playroom/FramesPanel/FramesPanel.css.ts +5 -4
- package/src/Playroom/FramesPanel/FramesPanel.tsx +3 -4
- package/src/Playroom/Playroom.tsx +3 -4
- package/src/Playroom/Preview.tsx +22 -23
- package/src/Playroom/Snippets/Snippets.tsx +4 -5
- package/src/Playroom/SplashScreen/SplashScreen.tsx +1 -0
- package/src/Playroom/WindowPortal/index.tsx +58 -63
- package/src/StoreContext/StoreContext.tsx +223 -225
- package/src/frame.js +2 -2
- package/src/index.js +6 -6
- package/src/preview.js +2 -2
- package/src/render.js +19 -0
- package/src/utils/compileJsx.ts +4 -1
- package/src/utils/componentsToHints.ts +1 -1
- package/tsconfig.json +1 -1
- package/cypress.json +0 -4
package/.babelrc
CHANGED
|
@@ -3,11 +3,5 @@
|
|
|
3
3
|
"@babel/preset-typescript",
|
|
4
4
|
"@babel/preset-env",
|
|
5
5
|
"@babel/preset-react"
|
|
6
|
-
],
|
|
7
|
-
"plugins": [
|
|
8
|
-
"@babel/plugin-proposal-class-properties",
|
|
9
|
-
"@babel/plugin-proposal-optional-chaining",
|
|
10
|
-
"@babel/plugin-proposal-nullish-coalescing-operator",
|
|
11
|
-
"@vanilla-extract/babel-plugin"
|
|
12
6
|
]
|
|
13
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "master",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -13,26 +13,30 @@ jobs:
|
|
|
13
13
|
CI: true
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout Repo
|
|
16
|
-
uses: actions/checkout@
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
17
|
|
|
18
|
-
- name:
|
|
19
|
-
uses:
|
|
18
|
+
- name: Set up pnpm
|
|
19
|
+
uses: pnpm/action-setup@v2.2.2
|
|
20
|
+
|
|
21
|
+
- name: Set up Node.js
|
|
22
|
+
uses: actions/setup-node@v3
|
|
20
23
|
with:
|
|
21
|
-
node-version:
|
|
24
|
+
node-version-file: 'package.json'
|
|
25
|
+
cache: 'pnpm'
|
|
22
26
|
|
|
23
27
|
- name: Install Dependencies
|
|
24
|
-
run:
|
|
28
|
+
run: pnpm i
|
|
25
29
|
|
|
26
30
|
- name: Build
|
|
27
|
-
run:
|
|
31
|
+
run: pnpm build:themed
|
|
28
32
|
|
|
29
33
|
- name: Deploy to surge
|
|
30
|
-
run:
|
|
34
|
+
run: pnpm deploy-preview -d playroom--${GITHUB_SHA}.surge.sh
|
|
31
35
|
env:
|
|
32
36
|
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
|
|
33
37
|
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
|
|
34
38
|
|
|
35
39
|
- name: Update PR status
|
|
36
|
-
run:
|
|
40
|
+
run: pnpm post-commit-status
|
|
37
41
|
env:
|
|
38
42
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -13,22 +13,28 @@ jobs:
|
|
|
13
13
|
CI: true
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout Repo
|
|
16
|
-
uses: actions/checkout@
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
17
|
with:
|
|
18
|
-
# This makes Actions fetch all Git history
|
|
18
|
+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
|
19
19
|
fetch-depth: 0
|
|
20
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
21
20
|
|
|
22
|
-
- name:
|
|
23
|
-
uses:
|
|
21
|
+
- name: Set up pnpm
|
|
22
|
+
uses: pnpm/action-setup@v2.2.2
|
|
23
|
+
|
|
24
|
+
- name: Set up Node.js
|
|
25
|
+
uses: actions/setup-node@v3
|
|
24
26
|
with:
|
|
25
|
-
node-version:
|
|
27
|
+
node-version-file: 'package.json'
|
|
28
|
+
cache: 'pnpm'
|
|
26
29
|
|
|
27
30
|
- name: Install Dependencies
|
|
28
|
-
run:
|
|
31
|
+
run: pnpm i
|
|
29
32
|
|
|
30
|
-
- name: Publish to npm
|
|
31
|
-
|
|
33
|
+
- name: Create Release Pull Request or Publish to npm
|
|
34
|
+
uses: changesets/action@v1
|
|
35
|
+
with:
|
|
36
|
+
version: pnpm run version
|
|
37
|
+
publish: pnpm release
|
|
32
38
|
env:
|
|
33
|
-
GITHUB_TOKEN: ${{ secrets.
|
|
34
|
-
NPM_TOKEN: ${{ secrets.
|
|
39
|
+
GITHUB_TOKEN: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
|
|
40
|
+
NPM_TOKEN: ${{ secrets.SEEK_OSS_CI_NPM_TOKEN }}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Snapshot
|
|
2
|
+
|
|
3
|
+
on: workflow_dispatch
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
release:
|
|
7
|
+
name: Publish snapshot version
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
env:
|
|
10
|
+
CI: true
|
|
11
|
+
steps:
|
|
12
|
+
- name: Check out repo
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
|
+
with:
|
|
15
|
+
# This makes Actions fetch all Git history for semantic-release
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
18
|
+
|
|
19
|
+
- name: Set up pnpm
|
|
20
|
+
uses: pnpm/action-setup@v2.2.2
|
|
21
|
+
|
|
22
|
+
- name: Set up Node.js
|
|
23
|
+
uses: actions/setup-node@v3
|
|
24
|
+
with:
|
|
25
|
+
node-version-file: 'package.json'
|
|
26
|
+
cache: 'pnpm'
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: pnpm i
|
|
30
|
+
|
|
31
|
+
- name: Publish
|
|
32
|
+
uses: seek-oss/changesets-snapshot@v0
|
|
33
|
+
env:
|
|
34
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
+
NPM_TOKEN: ${{ secrets.SEEK_OSS_CI_NPM_TOKEN }}
|
|
@@ -10,21 +10,48 @@ jobs:
|
|
|
10
10
|
CI: true
|
|
11
11
|
steps:
|
|
12
12
|
- name: Checkout Repo
|
|
13
|
-
uses: actions/checkout@
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
14
|
|
|
15
|
-
- name:
|
|
16
|
-
uses:
|
|
15
|
+
- name: Set up pnpm
|
|
16
|
+
uses: pnpm/action-setup@v2.2.2
|
|
17
|
+
|
|
18
|
+
- name: Set up Node.js
|
|
19
|
+
uses: actions/setup-node@v3
|
|
20
|
+
with:
|
|
21
|
+
node-version-file: 'package.json'
|
|
22
|
+
|
|
23
|
+
- name: Get pnpm store directory
|
|
24
|
+
id: pnpm-cache
|
|
25
|
+
shell: bash
|
|
26
|
+
run: |
|
|
27
|
+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
28
|
+
|
|
29
|
+
- name: Cache node modules
|
|
30
|
+
uses: actions/cache@v3
|
|
31
|
+
with:
|
|
32
|
+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
33
|
+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
34
|
+
restore-keys: |
|
|
35
|
+
${{ runner.os }}-pnpm-store-
|
|
36
|
+
|
|
37
|
+
- name: Cache Cypress binary
|
|
38
|
+
uses: actions/cache@v3
|
|
17
39
|
with:
|
|
18
|
-
|
|
40
|
+
path: ~/.cache/Cypress
|
|
41
|
+
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
42
|
+
restore-keys: |
|
|
43
|
+
cypress-${{ runner.os }}-cypress-
|
|
19
44
|
|
|
20
45
|
- name: Install Dependencies
|
|
21
|
-
run:
|
|
46
|
+
run: pnpm i
|
|
22
47
|
|
|
23
48
|
- name: Lint
|
|
24
|
-
run:
|
|
49
|
+
run: pnpm lint
|
|
25
50
|
|
|
26
51
|
- name: Test
|
|
27
|
-
run:
|
|
52
|
+
run: pnpm test
|
|
28
53
|
|
|
29
54
|
- name: Cypress
|
|
30
|
-
run:
|
|
55
|
+
run: |
|
|
56
|
+
pnpm cypress:verify
|
|
57
|
+
pnpm cypress
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
16.13.0
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# playroom
|
|
2
|
+
|
|
3
|
+
## 0.28.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8030325: Update all dependencies
|
|
8
|
+
- 8030325: Fix error message on gutter marker tooltip
|
|
9
|
+
|
|
10
|
+
Playroom wraps the code in a Fragment to compile it and then removes it from the error message displayed as a tooltip on the gutter marker if it fails to compile.
|
|
11
|
+
|
|
12
|
+
The logic has been improved to remove the first occurence of an opening `<React.Fragment>` and the last occurence of `</React.Fragment>`.
|
|
13
|
+
|
|
14
|
+
Errors should no longer incorrectly have a stray closing fragment:
|
|
15
|
+
|
|
16
|
+
```diff
|
|
17
|
+
"unknown: Expected corresponding JSX closing tag for <Boxerror>. (3:0)
|
|
18
|
+
|
|
19
|
+
1 | <Boxerror>
|
|
20
|
+
2 | ...
|
|
21
|
+
-> 3 | </Box></React.Fragment>
|
|
22
|
+
+> 3 | </Box>
|
|
23
|
+
| ^"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- cbcf1cf: Update dependencies (and move to pnpm internally)
|
package/README.md
CHANGED
|
@@ -30,6 +30,8 @@ Playroom allows you to create a zero-install code-oriented design environment, b
|
|
|
30
30
|
|
|
31
31
|
[Mística Design System](https://mistica-web.vercel.app/playroom) (Themed)
|
|
32
32
|
|
|
33
|
+
[Shopify Polaris](https://polaris.shopify.com/sandbox?code=N4Igxg9gJgpiBcIA8BhAhgJygHQHYAJ8BnGSXKTATwDEIIAXGDAQTHoEsJciBeYAbWBlGuevHwByACLsiAW1lEJAXwC6yvIQAOGdnKq0GTVhy58hXEWMkBRAB5aIGevgBKMR85UbcAPk34qJhQAHQAEjBosBj4aGyc3HyC%2BMIwouISACoMaAA2%2BADKeTBK%2BGrK%2BBz0uTA82CBFNUT1-gSEgQAKEI4AbkwB7bHxfXwAZnkkPoOEcRw9aPROfAPTSABCAK70iwRQsmC5EEQbGDD4Wrlo7H4r0-gAauwwAO6Fxc1td0gA9JvbXK07lNplwUIcSHwABQASnwPF8%2BGAymBhEBqxMCQAMrIXOxGHJeAILKI0tYJABxDBHIhvJoqAA0iNS6UkADkYC5GiUVOp8N80YQfl1ekw0T90FhwpFomKJaECqRTDdPoFMjA7PQUJYrrhRbd8ABNCAbFJoAgbEjEd74U6eeg0xbEGBna6jJz6JWxABGxpclGNMTAFsWciYREAmAT6pzRGletAkKD4LgpXSMXRoYgbMAAC1iNKI1ogfRiHFDjK9lBS2bNutyjKc%2BAr%2BqI9DQo1GIRWPzVGq1oh1era4uCIQV8QBASCkrHnqqNTqIGyrfyXJpa1OaAA1lAIM9cC0u%2B4iAGwDBsS39adjydT6y0KHzERrgBzDaXDAZAs1CSMi4nPKfu83j6niMAEkk%2BqEMAkHtF%2BJQZAA8lgYY-jBMxyMaLISAAqgUUgACQAAwhIRhGoSqdwnLkGS2k49rfNGKH0jByjMRR7TQexgxwUQGTuPQJzcORdyDPemFkgAtLhBEAEwAKzEaRwkiYQVE0R4dFEN8pwCRgQlsSprH6uol5pNEACS%2BJQqBciwvCiIwWQLaIjxjJiRsoiMlRFQ8PgNkANwwTpgn4JCaGBEeJ5njiISWWB4WqRguR8N5CVDKeRBPl67C5HilCYmgXowMlwAAAaPC8tIlPgboxPhwA8copUoip%2BACq1SAFK2YCbu1rWBF1cSbrF%2BI1TluS%2BA17zKD8g09SNYF9R1c3DXFciTe5ogzd8K0LetaWzd1vXhT8kU3tFLZ7UthDQoF7HIvq-KTt8cqjoqCSyiOM4JJUeLzvUUiRMMCwwImtHOM0ICZl6UAbKD7VIOe9BLYjMVrb4HRoP6WxED8SNXfqqOXejS55FVa6Vig1a4LWeNo-iCPfEjYovV970TkOr3fcmc61PUrJGAeKpID2mratcg53Jk2ZnDxNoaRDsSnLE8w5YVNRJrguSVuwoz4NjMQtk4Lo0jzMuFNm3S65Q%2BoXGaSYxNm7DPjLGCdsL3yi32rYSxgLNc%2BzyrDlgvggPSID0DLoZEAg-AgIcYDFPAaQgKo4fPOwUCRzH8D8OoQA)
|
|
34
|
+
|
|
33
35
|
Send us a PR if you'd like to be in this list!
|
|
34
36
|
|
|
35
37
|
## Getting Started
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
assertPreviewContains,
|
|
3
|
+
getFirstFrame,
|
|
4
|
+
loadPlayroom,
|
|
5
|
+
} from '../support/utils';
|
|
2
6
|
|
|
3
7
|
describe('Smoke', () => {
|
|
4
8
|
it('frames are interactive', () => {
|
|
@@ -9,8 +13,8 @@ describe('Smoke', () => {
|
|
|
9
13
|
it('preview mode loads correctly', () => {
|
|
10
14
|
cy.visit(
|
|
11
15
|
'http://localhost:9000/preview#?code=N4Igxg9gJgpiBcIA8AxCEB8r1YEIEMAnAei2LUyXJxAF8g'
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
assertPreviewContains('Foo\nFoo\nBar');
|
|
15
19
|
});
|
|
16
20
|
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/cypress/support/utils.js
CHANGED
|
@@ -114,9 +114,14 @@ export const assertFramesMatch = (matches) =>
|
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
export const assertPreviewContains = (text) =>
|
|
117
|
-
cy
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
cy
|
|
118
|
+
.then(() => {
|
|
119
|
+
cy.get('[data-testid="splashscreen"]').should('not.be.visible');
|
|
120
|
+
})
|
|
121
|
+
.get('body')
|
|
122
|
+
.then((el) => {
|
|
123
|
+
expect(el.get(0).innerText).to.eq(text);
|
|
124
|
+
});
|
|
120
125
|
|
|
121
126
|
export const loadPlayroom = () =>
|
|
122
127
|
cy
|
package/lib/build.js
CHANGED
|
@@ -16,7 +16,7 @@ module.exports = async (config, callback = noop) => {
|
|
|
16
16
|
|
|
17
17
|
if (stats.hasErrors()) {
|
|
18
18
|
const info = stats.toJson();
|
|
19
|
-
return callback(info.errors.join('\n\n'));
|
|
19
|
+
return callback(info.errors.map((error) => error.message).join('\n\n'));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
return callback();
|
package/lib/makeWebpackConfig.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
1
2
|
const path = require('path');
|
|
2
3
|
const webpack = require('webpack');
|
|
3
4
|
const { merge } = require('webpack-merge');
|
|
@@ -18,6 +19,22 @@ module.exports = async (playroomConfig, options) => {
|
|
|
18
19
|
const relativeResolve = (requirePath) =>
|
|
19
20
|
require.resolve(requirePath, { paths: [playroomConfig.cwd] });
|
|
20
21
|
|
|
22
|
+
let isLegacyReact = true;
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
// eslint-disable-next-line no-sync
|
|
26
|
+
const pkgContents = fs.readFileSync(
|
|
27
|
+
relativeResolve('react-dom/package.json'),
|
|
28
|
+
{
|
|
29
|
+
encoding: 'utf-8',
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
const { version } = JSON.parse(pkgContents);
|
|
33
|
+
isLegacyReact = !(version.startsWith('18') || version.startsWith('0.0.0'));
|
|
34
|
+
} catch (e) {
|
|
35
|
+
throw new Error('Unable to read `react-dom` package json');
|
|
36
|
+
}
|
|
37
|
+
|
|
21
38
|
const staticTypes = await getStaticTypes(playroomConfig);
|
|
22
39
|
|
|
23
40
|
const ourConfig = {
|
|
@@ -158,6 +175,16 @@ module.exports = async (playroomConfig, options) => {
|
|
|
158
175
|
new VanillaExtractPlugin(),
|
|
159
176
|
new MiniCssExtractPlugin({ ignoreOrder: true }),
|
|
160
177
|
...(options.production ? [] : [new FriendlyErrorsWebpackPlugin()]),
|
|
178
|
+
// If using a version of React earlier than 18, ignore the
|
|
179
|
+
// react-dom/client import. This hack can be removed when
|
|
180
|
+
// support for older versions of React is removed.
|
|
181
|
+
...(isLegacyReact
|
|
182
|
+
? [
|
|
183
|
+
new webpack.IgnorePlugin({
|
|
184
|
+
resourceRegExp: /react-dom\/client$/,
|
|
185
|
+
}),
|
|
186
|
+
]
|
|
187
|
+
: []),
|
|
161
188
|
],
|
|
162
189
|
devtool: !options.production && 'eval-source-map',
|
|
163
190
|
};
|
package/package.json
CHANGED
|
@@ -1,55 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playroom",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "Design with code, powered by your own component library",
|
|
5
5
|
"main": "utils/index.js",
|
|
6
6
|
"types": "utils/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"playroom": "bin/cli.js"
|
|
9
9
|
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"cypress": "start-server-and-test build-and-serve:all '9000|9001' 'cypress run'",
|
|
12
|
-
"cypress:dev": "start-server-and-test start:all '9000|9001' 'cypress open'",
|
|
13
|
-
"start:basic": "./bin/cli.js start --config cypress/projects/basic/playroom.config.js",
|
|
14
|
-
"build:basic": "./bin/cli.js build --config cypress/projects/basic/playroom.config.js",
|
|
15
|
-
"serve:basic": "PORT=9000 serve cypress/projects/basic/dist",
|
|
16
|
-
"start:themed": "./bin/cli.js start --config cypress/projects/themed/playroom.config.js",
|
|
17
|
-
"build:themed": "./bin/cli.js build --config cypress/projects/themed/playroom.config.js",
|
|
18
|
-
"serve:themed": "PORT=9001 serve --config ../serve.json cypress/projects/themed/dist",
|
|
19
|
-
"start:all": "concurrently 'npm:start:basic' 'npm:start:themed'",
|
|
20
|
-
"build:all": "concurrently 'npm:build:basic' 'npm:build:themed'",
|
|
21
|
-
"serve:all": "concurrently 'npm:serve:basic' 'npm:serve:themed'",
|
|
22
|
-
"build-and-serve:all": "yarn build:all && yarn serve:all",
|
|
23
|
-
"commit": "git-cz",
|
|
24
|
-
"lint": "eslint . && prettier --list-different '**/*.{js,md,less,ts,tsx}' && tsc --noEmit",
|
|
25
|
-
"format": "prettier --write '**/*.{js,md,less,ts,tsx}'",
|
|
26
|
-
"semantic-release": "semantic-release",
|
|
27
|
-
"test": "jest src",
|
|
28
|
-
"post-commit-status": "node scripts/postCommitStatus.js",
|
|
29
|
-
"deploy-preview": "surge -p ./cypress/projects/themed/dist"
|
|
30
|
-
},
|
|
31
|
-
"husky": {
|
|
32
|
-
"hooks": {
|
|
33
|
-
"commit-msg": "commitlint --edit --extends seek",
|
|
34
|
-
"pre-commit": "lint-staged"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
10
|
"lint-staged": {
|
|
38
11
|
"**/*.{js,ts,tsx}": [
|
|
39
|
-
"
|
|
12
|
+
"eslint"
|
|
40
13
|
],
|
|
41
|
-
"**/*.{js,md,
|
|
14
|
+
"**/*.{js,md,ts,tsx}": [
|
|
42
15
|
"prettier --write"
|
|
43
16
|
]
|
|
44
17
|
},
|
|
45
|
-
"config": {
|
|
46
|
-
"commitizen": {
|
|
47
|
-
"path": "cz-conventional-changelog"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"release": {
|
|
51
|
-
"success": false
|
|
52
|
-
},
|
|
53
18
|
"repository": {
|
|
54
19
|
"type": "git",
|
|
55
20
|
"url": "https://github.com/seek-oss/playroom.git"
|
|
@@ -61,89 +26,106 @@
|
|
|
61
26
|
},
|
|
62
27
|
"homepage": "https://github.com/seek-oss/playroom#readme",
|
|
63
28
|
"dependencies": {
|
|
64
|
-
"@babel/cli": "^7.
|
|
65
|
-
"@babel/core": "^7.
|
|
66
|
-
"@babel/preset-env": "^7.
|
|
67
|
-
"@babel/preset-react": "^7.
|
|
68
|
-
"@babel/preset-typescript": "^7.
|
|
69
|
-
"@babel/standalone": "^7.
|
|
70
|
-
"@soda/friendly-errors-webpack-plugin": "^1.8.
|
|
29
|
+
"@babel/cli": "^7.19.3",
|
|
30
|
+
"@babel/core": "^7.20.5",
|
|
31
|
+
"@babel/preset-env": "^7.20.2",
|
|
32
|
+
"@babel/preset-react": "^7.18.6",
|
|
33
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
34
|
+
"@babel/standalone": "^7.20.6",
|
|
35
|
+
"@soda/friendly-errors-webpack-plugin": "^1.8.1",
|
|
71
36
|
"@types/base64-url": "^2.2.0",
|
|
72
|
-
"@types/codemirror": "^
|
|
37
|
+
"@types/codemirror": "^5.60.5",
|
|
73
38
|
"@types/dedent": "^0.7.0",
|
|
74
|
-
"@types/
|
|
75
|
-
"@types/lodash": "^4.14.168",
|
|
39
|
+
"@types/lodash": "^4.14.191",
|
|
76
40
|
"@types/lz-string": "^1.3.34",
|
|
77
|
-
"@types/prettier": "^2.
|
|
78
|
-
"@types/react": "^
|
|
79
|
-
"@types/react-dom": "^
|
|
80
|
-
"@vanilla-extract/
|
|
81
|
-
"@vanilla-extract/css": "^1.
|
|
82
|
-
"@vanilla-extract/
|
|
83
|
-
"@vanilla-extract/
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"command-line-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"css-loader": "^5.1.3",
|
|
41
|
+
"@types/prettier": "^2.7.1",
|
|
42
|
+
"@types/react": "^18.0.26",
|
|
43
|
+
"@types/react-dom": "^18.0.9",
|
|
44
|
+
"@vanilla-extract/css": "^1.9.2",
|
|
45
|
+
"@vanilla-extract/css-utils": "^0.1.3",
|
|
46
|
+
"@vanilla-extract/sprinkles": "^1.5.1",
|
|
47
|
+
"@vanilla-extract/webpack-plugin": "2.1.12",
|
|
48
|
+
"babel-loader": "^9.1.0",
|
|
49
|
+
"classnames": "^2.3.2",
|
|
50
|
+
"codemirror": "^5.65.10",
|
|
51
|
+
"command-line-args": "^5.2.1",
|
|
52
|
+
"command-line-usage": "^6.1.3",
|
|
53
|
+
"copy-to-clipboard": "^3.3.3",
|
|
54
|
+
"css-loader": "^6.7.2",
|
|
92
55
|
"current-git-branch": "^1.1.0",
|
|
93
56
|
"dedent": "^0.7.0",
|
|
94
|
-
"fast-glob": "^3.2.
|
|
57
|
+
"fast-glob": "^3.2.12",
|
|
95
58
|
"find-up": "^5.0.0",
|
|
96
59
|
"fuzzy": "^0.1.3",
|
|
97
|
-
"history": "^5.
|
|
98
|
-
"html-webpack-plugin": "^5.
|
|
99
|
-
"intersection-observer": "^0.12.
|
|
100
|
-
"localforage": "^1.
|
|
101
|
-
"locate-path": "^6.0.0",
|
|
60
|
+
"history": "^5.3.0",
|
|
61
|
+
"html-webpack-plugin": "^5.5.0",
|
|
62
|
+
"intersection-observer": "^0.12.2",
|
|
63
|
+
"localforage": "^1.10.0",
|
|
102
64
|
"lodash": "^4.17.21",
|
|
103
65
|
"lz-string": "^1.4.4",
|
|
104
|
-
"mini-css-extract-plugin": "^2.
|
|
66
|
+
"mini-css-extract-plugin": "^2.7.2",
|
|
105
67
|
"parse-prop-types": "^0.3.0",
|
|
106
|
-
"polished": "^4.
|
|
107
|
-
"portfinder": "^1.0.
|
|
108
|
-
"prettier": "^2.
|
|
109
|
-
"prop-types": "^15.
|
|
110
|
-
"query-string": "^
|
|
111
|
-
"re-resizable": "^6.9.
|
|
112
|
-
"react-
|
|
113
|
-
"react-
|
|
114
|
-
"react-use": "^17.2.1",
|
|
68
|
+
"polished": "^4.2.2",
|
|
69
|
+
"portfinder": "^1.0.32",
|
|
70
|
+
"prettier": "^2.8.1",
|
|
71
|
+
"prop-types": "^15.8.1",
|
|
72
|
+
"query-string": "^7.1.3",
|
|
73
|
+
"re-resizable": "^6.9.9",
|
|
74
|
+
"react-docgen-typescript": "^2.2.2",
|
|
75
|
+
"react-use": "^17.4.0",
|
|
115
76
|
"read-pkg-up": "^7.0.1",
|
|
116
77
|
"scope-eval": "^1.0.0",
|
|
117
|
-
"typescript": "^4.
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"webpack": "^
|
|
121
|
-
"webpack-
|
|
122
|
-
"webpack-merge": "^5.7.3"
|
|
78
|
+
"typescript": "^4.5.4",
|
|
79
|
+
"use-debounce": "^9.0.2",
|
|
80
|
+
"webpack": "^5.75.0",
|
|
81
|
+
"webpack-dev-server": "^4.11.1",
|
|
82
|
+
"webpack-merge": "^5.8.0"
|
|
123
83
|
},
|
|
124
84
|
"devDependencies": {
|
|
125
|
-
"@
|
|
126
|
-
"@octokit/rest": "^
|
|
127
|
-
"@types/jest": "^
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"semantic-release": "^17.4.2",
|
|
141
|
-
"serve": "^11.3.2",
|
|
142
|
-
"start-server-and-test": "^1.12.0",
|
|
143
|
-
"surge": "^0.22.1"
|
|
85
|
+
"@changesets/cli": "^2.25.2",
|
|
86
|
+
"@octokit/rest": "^19.0.5",
|
|
87
|
+
"@types/jest": "^29.2.4",
|
|
88
|
+
"concurrently": "^7.6.0",
|
|
89
|
+
"cypress": "^12.0.2",
|
|
90
|
+
"eslint": "^8.29.0",
|
|
91
|
+
"eslint-config-seek": "^10.1.2",
|
|
92
|
+
"husky": "^8.0.2",
|
|
93
|
+
"jest": "^29.3.1",
|
|
94
|
+
"lint-staged": "^13.1.0",
|
|
95
|
+
"react": "^18.0.1",
|
|
96
|
+
"react-dom": "^18.0.1",
|
|
97
|
+
"serve": "^14.1.2",
|
|
98
|
+
"start-server-and-test": "^1.15.2",
|
|
99
|
+
"surge": "^0.23.1"
|
|
144
100
|
},
|
|
145
101
|
"peerDependencies": {
|
|
146
|
-
"react": "^16.8 || ^17
|
|
147
|
-
"react-dom": "^16.8 || ^17
|
|
102
|
+
"react": "^16.8 || ^17 || ^18",
|
|
103
|
+
"react-dom": "^16.8 || ^17 || ^18"
|
|
104
|
+
},
|
|
105
|
+
"packageManager": "pnpm@7.18.1",
|
|
106
|
+
"volta": {
|
|
107
|
+
"node": "16.13.0"
|
|
108
|
+
},
|
|
109
|
+
"scripts": {
|
|
110
|
+
"cypress": "start-server-and-test build-and-serve:all '9000|9001' 'cypress run'",
|
|
111
|
+
"cypress:dev": "start-server-and-test start:all '9000|9001' 'cypress open --browser chrome --e2e'",
|
|
112
|
+
"cypress:verify": "cypress verify",
|
|
113
|
+
"start:basic": "./bin/cli.js start --config cypress/projects/basic/playroom.config.js",
|
|
114
|
+
"build:basic": "./bin/cli.js build --config cypress/projects/basic/playroom.config.js",
|
|
115
|
+
"serve:basic": "PORT=9000 serve --no-request-logging cypress/projects/basic/dist",
|
|
116
|
+
"start:themed": "./bin/cli.js start --config cypress/projects/themed/playroom.config.js",
|
|
117
|
+
"build:themed": "./bin/cli.js build --config cypress/projects/themed/playroom.config.js",
|
|
118
|
+
"serve:themed": "PORT=9001 serve --config ../serve.json --no-request-logging cypress/projects/themed/dist",
|
|
119
|
+
"start:all": "concurrently 'npm:start:basic' 'npm:start:themed'",
|
|
120
|
+
"build:all": "concurrently 'npm:build:basic' 'npm:build:themed'",
|
|
121
|
+
"serve:all": "concurrently 'npm:serve:basic' 'npm:serve:themed'",
|
|
122
|
+
"build-and-serve:all": "pnpm build:all && pnpm serve:all",
|
|
123
|
+
"lint": "eslint . && prettier --list-different '**/*.{js,md,ts,tsx}' && tsc --noEmit",
|
|
124
|
+
"format": "prettier --write '**/*.{js,md,ts,tsx}'",
|
|
125
|
+
"version": "changeset version",
|
|
126
|
+
"release": "changeset publish",
|
|
127
|
+
"test": "jest src",
|
|
128
|
+
"post-commit-status": "node scripts/postCommitStatus.js",
|
|
129
|
+
"deploy-preview": "surge -p ./cypress/projects/themed/dist"
|
|
148
130
|
}
|
|
149
|
-
}
|
|
131
|
+
}
|