From 86fa74396f82d5033fd09ad3cc59ae649b4e9218 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Thu, 9 Feb 2023 17:50:50 +0100 Subject: [PATCH] chore: add missing bin entry for CT packages (#20669) https://github.com/microsoft/playwright/issues/20639 PNPM does not include nested dependencies into its .bin directory. See here: https://github.com/pnpm/pnpm/issues/96 --- packages/playwright-ct-react/cli.js | 17 +++++++++++++++++ packages/playwright-ct-react/package.json | 3 +++ packages/playwright-ct-solid/cli.js | 17 +++++++++++++++++ packages/playwright-ct-solid/package.json | 3 +++ packages/playwright-ct-svelte/cli.js | 17 +++++++++++++++++ packages/playwright-ct-svelte/package.json | 3 +++ packages/playwright-ct-vue/cli.js | 17 +++++++++++++++++ packages/playwright-ct-vue/package.json | 3 +++ packages/playwright-ct-vue2/cli.js | 17 +++++++++++++++++ packages/playwright-ct-vue2/package.json | 3 +++ 10 files changed, 100 insertions(+) create mode 100644 packages/playwright-ct-react/cli.js create mode 100644 packages/playwright-ct-solid/cli.js create mode 100644 packages/playwright-ct-svelte/cli.js create mode 100644 packages/playwright-ct-vue/cli.js create mode 100644 packages/playwright-ct-vue2/cli.js diff --git a/packages/playwright-ct-react/cli.js b/packages/playwright-ct-react/cli.js new file mode 100644 index 0000000000..17ed363fa2 --- /dev/null +++ b/packages/playwright-ct-react/cli.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node +/** + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = require('playwright-core/cli'); diff --git a/packages/playwright-ct-react/package.json b/packages/playwright-ct-react/package.json index d01582d579..2c1adb43cc 100644 --- a/packages/playwright-ct-react/package.json +++ b/packages/playwright-ct-react/package.json @@ -29,5 +29,8 @@ "@vitejs/plugin-react": "^3.0.0", "@playwright/test": "1.31.0-next", "vite": "^4.0.3" + }, + "bin": { + "playwright": "./cli.js" } } diff --git a/packages/playwright-ct-solid/cli.js b/packages/playwright-ct-solid/cli.js new file mode 100644 index 0000000000..17ed363fa2 --- /dev/null +++ b/packages/playwright-ct-solid/cli.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node +/** + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = require('playwright-core/cli'); diff --git a/packages/playwright-ct-solid/package.json b/packages/playwright-ct-solid/package.json index f29df833e4..1d4dd9012c 100644 --- a/packages/playwright-ct-solid/package.json +++ b/packages/playwright-ct-solid/package.json @@ -32,5 +32,8 @@ }, "devDependencies": { "solid-js": "^1.4.7" + }, + "bin": { + "playwright": "./cli.js" } } diff --git a/packages/playwright-ct-svelte/cli.js b/packages/playwright-ct-svelte/cli.js new file mode 100644 index 0000000000..17ed363fa2 --- /dev/null +++ b/packages/playwright-ct-svelte/cli.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node +/** + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = require('playwright-core/cli'); diff --git a/packages/playwright-ct-svelte/package.json b/packages/playwright-ct-svelte/package.json index 14bf58c05a..57fcccf9b8 100644 --- a/packages/playwright-ct-svelte/package.json +++ b/packages/playwright-ct-svelte/package.json @@ -32,5 +32,8 @@ }, "devDependencies": { "svelte": "^3.49.0" + }, + "bin": { + "playwright": "./cli.js" } } diff --git a/packages/playwright-ct-vue/cli.js b/packages/playwright-ct-vue/cli.js new file mode 100644 index 0000000000..17ed363fa2 --- /dev/null +++ b/packages/playwright-ct-vue/cli.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node +/** + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = require('playwright-core/cli'); diff --git a/packages/playwright-ct-vue/package.json b/packages/playwright-ct-vue/package.json index ca8035f4da..9c39ee244c 100644 --- a/packages/playwright-ct-vue/package.json +++ b/packages/playwright-ct-vue/package.json @@ -29,5 +29,8 @@ "@vitejs/plugin-vue": "^4.0.0", "@playwright/test": "1.31.0-next", "vite": "^4.0.3" + }, + "bin": { + "playwright": "./cli.js" } } diff --git a/packages/playwright-ct-vue2/cli.js b/packages/playwright-ct-vue2/cli.js new file mode 100644 index 0000000000..17ed363fa2 --- /dev/null +++ b/packages/playwright-ct-vue2/cli.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node +/** + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = require('playwright-core/cli'); diff --git a/packages/playwright-ct-vue2/package.json b/packages/playwright-ct-vue2/package.json index e66462d2a2..9b025e6e35 100644 --- a/packages/playwright-ct-vue2/package.json +++ b/packages/playwright-ct-vue2/package.json @@ -32,5 +32,8 @@ }, "devDependencies": { "vue": "^2.7.13" + }, + "bin": { + "playwright": "./cli.js" } }