chore: upgrade to npm 7 (workspaces), get rid of yarn

This commit is contained in:
jorenbroekema 2020-10-27 18:21:18 +01:00 committed by Thomas Allmer
parent d5cf007b90
commit 531b04bd62
56 changed files with 46173 additions and 13293 deletions

View file

@ -18,33 +18,36 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup Node.js 12.x
- name: Setup Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 12.x
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install npm 7
run: npm i -g npm@7
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Install Dependencies
run: yarn --frozen-lockfile
run: npm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View file

@ -14,26 +14,29 @@ jobs:
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install npm 7
run: npm i -g npm@7
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Install Dependencies
run: npm install
- name: Lint
run: yarn lint
run: npm run lint
- name: Bundlesize
run: yarn bundlesize
run: npm run bundlesize
browser-tests:
name: Browser tests
@ -46,25 +49,28 @@ jobs:
with:
node-version: 14.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install npm 7
run: npm i -g npm@7
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Install Dependencies
run: npm install
- uses: microsoft/playwright-github-action@v1
- name: Test
run: yarn test:browser
run: npm run test:browser
node-tests:
name: Node tests
@ -80,20 +86,23 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Install npm 7
run: npm i -g npm@7
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Install Dependencies
run: npm install
- name: Test
run: yarn test:node
run: npm run test:node

4
.gitignore vendored
View file

@ -12,8 +12,8 @@ node_modules/
npm-debug.log
yarn-error.log
# we do prefer yarn.lock so we do not want npms version of it
/package-lock.json
# we prefer package-lock.json
/yarn.lock
## build artifacts
/lib/

View file

@ -7,7 +7,7 @@ module.exports = {
"markdownlint --ignore '{.github/**/*.md,.changeset/*.md,**/CHANGELOG.md}'",
'git add',
],
'yarn.lock': ['node ./scripts/yarn-lock-scan.js'],
'package-lock.json': ['node ./scripts/package-lock-scan.js'],
'*package.json': absolutePaths => {
const sortPackages = [];
absolutePaths.forEach(p => {

View file

@ -19,13 +19,20 @@ git clone https://github.com/ing-bank/lion.git
cd lion
# Install dependencies
# We require yarn as we use yarn workspaces
yarn install
npm install
# Create a branch for your changes
git checkout -b fix/buttonSize
```
> Requires NPM v7 at least, since we use workspaces.
To install NPM 7:
```sh
npm i -g npm@7
```
Make sure everything works as expected:
```bash

View file

@ -17,8 +17,6 @@ For some more details see the [announcement blog post](https://medium.com/ing-bl
We do have a [live Storybook](http://lion-web-components.netlify.com) which shows all our components.
**Please note:** This project uses Yarn [Workspaces](https://classic.yarnpkg.com/en/docs/workspaces). If you want to run all demos locally you need to get [Yarn](https://classic.yarnpkg.com/en/docs/install) and install all dependencies by executing `yarn install`.
The code examples make use of [Javascript tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) which are a key component of the [lit-html engine](https://lit-html.polymer-project.org/) used in Lion.
Additionally imports like `import '@lion/form/lion-form.js'` need to be transformed somehow, for example by [es-dev-server](https://open-wc.org/developing/es-dev-server.html#node-resolve).
@ -144,7 +142,6 @@ Lion Web Components aims to be future proof and use well-supported proven techno
- [lit-html](https://lit-html.polymer-project.org) and [lit-element](https://lit-element.polymer-project.org)
- [npm](http://npmjs.com)
- [yarn](https://yarnpkg.com)
- [open-wc](https://open-wc.org)
- [Karma](https://karma-runner.github.io)
- [Mocha](https://mochajs.org)

View file

@ -30,7 +30,7 @@ For step 1, we can use `@open-wc/demoing-storybook` version 2 or higher, which u
Install it manually (and see the docs for configuring):
```sh
yarn add @open-wc/demoing-storybook --dev
npm i @open-wc/demoing-storybook --save-dev
```
Or scaffold it with basic configuration by doing
@ -71,7 +71,7 @@ To do this we make use of [Providence](https://lion-web-components.netlify.app/?
So lets install it:
```sh
yarn add providence-analytics --dev
npm i providence-analytics --save-dev
```
And to use it, let's add a script to your projects `package.json`:
@ -94,11 +94,13 @@ Inside ING, our design system also makes use of this providence tool to create t
```json
"scripts": {
"upgrade:lion": "yarn upgrade --scope @lion --latest --exact && yarn providence:extend",
"upgrade:lion": "npx update-by-scope @lion && npm run providence:extend",
"providence:extend": "providence extend-docs -r 'node_modules/@lion/*' --prefix-from lion --prefix-to ing"
}
```
> Note that if you want to fix your lion versions, you have to do this manually or write your own script for updating by scope. `update-by-scope` does not support passing `--save-exact` flag sadly (or any flag for that matter).
### Replacing paths & template tagnames
Now that we have a JSON file with all the information we need to know about to replace import paths and tagnames inside templates, we can start transforming the `LionTabs` documentation to `LeaTabs` documentation.
@ -110,7 +112,7 @@ This will analyse the JavaScript script and story content inside the markdown fi
So all you need to do is to install this plugin:
```sh
yarn add babel-plugin-extend-docs --dev
npm i babel-plugin-extend-docs --save-dev
```
and create a `babel.config.js` file in the root of your project:

45933
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -44,7 +44,7 @@
"@open-wc/eslint-config": "^1.0.0",
"@open-wc/testing": "^2.5.18",
"@open-wc/testing-helpers": "^1.0.0",
"@storybook/addon-a11y": "~5.0.0",
"@storybook/addon-a11y": "^5.3.21",
"@types/chai-dom": "^0.0.8",
"@web/dev-server": "^0.0.13",
"@web/dev-server-legacy": "^0.1.4",
@ -59,7 +59,7 @@
"chalk": "^4.1.0",
"concurrently": "^5.2.0",
"cross-env": "^7.0.2",
"eclint": "^2.8.1",
"eclint": "^2.1.0",
"es6-promisify": "^6.1.1",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.11.0",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group accordion",
"debug:firefox": "cd ../../ && yarn debug:firefox --group accordion",
"debug:webkit": "cd ../../ && yarn debug:webkit --group accordion",
"debug": "cd ../../ && npm run debug --group accordion",
"debug:firefox": "cd ../../ && npm run debug:firefox --group accordion",
"debug:webkit": "cd ../../ && npm run debug:webkit --group accordion",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group accordion"
"test": "cd ../../ && npm run test:browser --group accordion"
},
"sideEffects": [
"lion-accordion.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group ajax",
"debug:firefox": "cd ../../ && yarn debug:firefox --group ajax",
"debug:webkit": "cd ../../ && yarn debug:webkit --group ajax",
"debug": "cd ../../ && npm run debug --group ajax",
"debug:firefox": "cd ../../ && npm run debug:firefox --group ajax",
"debug:webkit": "cd ../../ && npm run debug:webkit --group ajax",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group ajax"
"test": "cd ../../ && npm run test:browser --group ajax"
},
"sideEffects": false,
"dependencies": {

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group button",
"debug:firefox": "cd ../../ && yarn debug:firefox --group button",
"debug:webkit": "cd ../../ && yarn debug:webkit --group button",
"debug": "cd ../../ && npm run debug --group button",
"debug:firefox": "cd ../../ && npm run debug:firefox --group button",
"debug:webkit": "cd ../../ && npm run debug:webkit --group button",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group button"
"test": "cd ../../ && npm run test:browser --group button"
},
"sideEffects": [
"lion-button.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group calendar",
"debug:firefox": "cd ../../ && yarn debug:firefox --group calendar",
"debug:webkit": "cd ../../ && yarn debug:webkit --group calendar",
"debug": "cd ../../ && npm run debug --group calendar",
"debug:firefox": "cd ../../ && npm run debug:firefox --group calendar",
"debug:webkit": "cd ../../ && npm run debug:webkit --group calendar",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group calendar"
"test": "cd ../../ && npm run test:browser --group calendar"
},
"sideEffects": [
"lion-calendar.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group checkbox-group",
"debug:firefox": "cd ../../ && yarn debug:firefox --group checkbox-group",
"debug:webkit": "cd ../../ && yarn debug:webkit --group checkbox-group",
"debug": "cd ../../ && npm run debug --group checkbox-group",
"debug:firefox": "cd ../../ && npm run debug:firefox --group checkbox-group",
"debug:webkit": "cd ../../ && npm run debug:webkit --group checkbox-group",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group checkbox-group"
"test": "cd ../../ && npm run test:browser --group checkbox-group"
},
"sideEffects": [
"lion-checkbox.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group collapsible",
"debug:firefox": "cd ../../ && yarn debug:firefox --group collapsible",
"debug:webkit": "cd ../../ && yarn debug:webkit --group collapsible",
"debug": "cd ../../ && npm run debug --group collapsible",
"debug:firefox": "cd ../../ && npm run debug:firefox --group collapsible",
"debug:webkit": "cd ../../ && npm run debug:webkit --group collapsible",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group collapsible"
"test": "cd ../../ && npm run test:browser --group collapsible"
},
"sideEffects": [
"lion-collapsible.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group combobox",
"debug:firefox": "cd ../../ && yarn debug:firefox --group combobox",
"debug:webkit": "cd ../../ && yarn debug:webkit --group combobox",
"debug": "cd ../../ && npm run debug --group combobox",
"debug:firefox": "cd ../../ && npm run debug:firefox --group combobox",
"debug:webkit": "cd ../../ && npm run debug:webkit --group combobox",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group combobox"
"test": "cd ../../ && npm run test:browser --group combobox"
},
"sideEffects": [
"lion-combobox.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group core",
"debug:firefox": "cd ../../ && yarn debug:firefox --group core",
"debug:webkit": "cd ../../ && yarn debug:webkit --group core",
"debug": "cd ../../ && npm run debug --group core",
"debug:firefox": "cd ../../ && npm run debug:firefox --group core",
"debug:webkit": "cd ../../ && npm run debug:webkit --group core",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group core"
"test": "cd ../../ && npm run test:browser --group core"
},
"sideEffects": false,
"dependencies": {

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group dialog",
"debug:firefox": "cd ../../ && yarn debug:firefox --group dialog",
"debug:webkit": "cd ../../ && yarn debug:webkit --group dialog",
"debug": "cd ../../ && npm run debug --group dialog",
"debug:firefox": "cd ../../ && npm run debug:firefox --group dialog",
"debug:webkit": "cd ../../ && npm run debug:webkit --group dialog",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group dialog"
"test": "cd ../../ && npm run test:browser --group dialog"
},
"sideEffects": [
"lion-dialog.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group fieldset",
"debug:firefox": "cd ../../ && yarn debug:firefox --group fieldset",
"debug:webkit": "cd ../../ && yarn debug:webkit --group fieldset",
"debug": "cd ../../ && npm run debug --group fieldset",
"debug:firefox": "cd ../../ && npm run debug:firefox --group fieldset",
"debug:webkit": "cd ../../ && npm run debug:webkit --group fieldset",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group fieldset"
"test": "cd ../../ && npm run test:browser --group fieldset"
},
"sideEffects": [
"lion-fieldset.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group form-core",
"debug:firefox": "cd ../../ && yarn debug:firefox --group form-core",
"debug:webkit": "cd ../../ && yarn debug:webkit --group form-core",
"debug": "cd ../../ && npm run debug --group form-core",
"debug:firefox": "cd ../../ && npm run debug:firefox --group form-core",
"debug:webkit": "cd ../../ && npm run debug:webkit --group form-core",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group form-core"
"test": "cd ../../ && npm run test:browser --group form-core"
},
"sideEffects": [
"lion-field.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group form-integrations",
"debug:firefox": "cd ../../ && yarn debug:firefox --group form-integrations",
"debug:webkit": "cd ../../ && yarn debug:webkit --group form-integrations",
"debug": "cd ../../ && npm run debug --group form-integrations",
"debug:firefox": "cd ../../ && npm run debug:firefox --group form-integrations",
"debug:webkit": "cd ../../ && npm run debug:webkit --group form-integrations",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group form-integrations"
"test": "cd ../../ && npm run test:browser --group form-integrations"
},
"sideEffects": [
"./docs/helper-wc/h-output.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group form",
"debug:firefox": "cd ../../ && yarn debug:firefox --group form",
"debug:webkit": "cd ../../ && yarn debug:webkit --group form",
"debug": "cd ../../ && npm run debug --group form",
"debug:firefox": "cd ../../ && npm run debug:firefox --group form",
"debug:webkit": "cd ../../ && npm run debug:webkit --group form",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group form"
"test": "cd ../../ && npm run test:browser --group form"
},
"sideEffects": [
"lion-form.js"

View file

@ -20,11 +20,11 @@
"sortEachDepth"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group helpers",
"debug:firefox": "cd ../../ && yarn debug:firefox --group helpers",
"debug:webkit": "cd ../../ && yarn debug:webkit --group helpers",
"debug": "cd ../../ && npm run debug --group helpers",
"debug:firefox": "cd ../../ && npm run debug:firefox --group helpers",
"debug:webkit": "cd ../../ && npm run debug:webkit --group helpers",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group helpers"
"test": "cd ../../ && npm run test:browser --group helpers"
},
"sideEffects": [
"sb-action-logger.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group icon",
"debug:firefox": "cd ../../ && yarn debug:firefox --group icon",
"debug:webkit": "cd ../../ && yarn debug:webkit --group icon",
"debug": "cd ../../ && npm run debug --group icon",
"debug:firefox": "cd ../../ && npm run debug:firefox --group icon",
"debug:webkit": "cd ../../ && npm run debug:webkit --group icon",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group icon"
"test": "cd ../../ && npm run test:browser --group icon"
},
"sideEffects": [
"lion-icon.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input-amount",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input-amount",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input-amount",
"debug": "cd ../../ && npm run debug --group input-amount",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input-amount",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input-amount",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input-amount"
"test": "cd ../../ && npm run test:browser --group input-amount"
},
"sideEffects": [
"lion-input-amount.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input-date",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input-date",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input-date",
"debug": "cd ../../ && npm run debug --group input-date",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input-date",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input-date",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input-date"
"test": "cd ../../ && npm run test:browser --group input-date"
},
"sideEffects": [
"lion-input-date.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input-datepicker",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input-datepicker",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input-datepicker",
"debug": "cd ../../ && npm run debug --group input-datepicker",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input-datepicker",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input-datepicker",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input-datepicker"
"test": "cd ../../ && npm run test:browser --group input-datepicker"
},
"sideEffects": [
"lion-input-datepicker.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input-email",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input-email",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input-email",
"debug": "cd ../../ && npm run debug --group input-email",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input-email",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input-email",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input-email"
"test": "cd ../../ && npm run test:browser --group input-email"
},
"sideEffects": [
"lion-input-email.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input-iban",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input-iban",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input-iban",
"debug": "cd ../../ && npm run debug --group input-iban",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input-iban",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input-iban",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input-iban"
"test": "cd ../../ && npm run test:browser --group input-iban"
},
"sideEffects": [
"lion-input-iban.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input-range",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input-range",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input-range",
"debug": "cd ../../ && npm run debug --group input-range",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input-range",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input-range",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input-range"
"test": "cd ../../ && npm run test:browser --group input-range"
},
"sideEffects": [
"lion-input-range.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input-stepper",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input-stepper",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input-stepper",
"debug": "cd ../../ && npm run debug --group input-stepper",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input-stepper",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input-stepper",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input-stepper"
"test": "cd ../../ && npm run test:browser --group input-stepper"
},
"sideEffects": [
"lion-input-stepper.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group input",
"debug:firefox": "cd ../../ && yarn debug:firefox --group input",
"debug:webkit": "cd ../../ && yarn debug:webkit --group input",
"debug": "cd ../../ && npm run debug --group input",
"debug:firefox": "cd ../../ && npm run debug:firefox --group input",
"debug:webkit": "cd ../../ && npm run debug:webkit --group input",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group input"
"test": "cd ../../ && npm run test:browser --group input"
},
"sideEffects": [
"lion-input.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group listbox",
"debug:firefox": "cd ../../ && yarn debug:firefox --group listbox",
"debug:webkit": "cd ../../ && yarn debug:webkit --group listbox",
"debug": "cd ../../ && npm run debug --group listbox",
"debug:firefox": "cd ../../ && npm run debug:firefox --group listbox",
"debug:webkit": "cd ../../ && npm run debug:webkit --group listbox",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group listbox"
"test": "cd ../../ && npm run test:browser --group listbox"
},
"sideEffects": [
"lion-listbox.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group localize",
"debug:firefox": "cd ../../ && yarn debug:firefox --group localize",
"debug:webkit": "cd ../../ && yarn debug:webkit --group localize",
"debug": "cd ../../ && npm run debug --group localize",
"debug:firefox": "cd ../../ && npm run debug:firefox --group localize",
"debug:webkit": "cd ../../ && npm run debug:webkit --group localize",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group localize"
"test": "cd ../../ && npm run test:browser --group localize"
},
"sideEffects": false,
"dependencies": {

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group overlays",
"debug:firefox": "cd ../../ && yarn debug:firefox --group overlays",
"debug:webkit": "cd ../../ && yarn debug:webkit --group overlays",
"debug": "cd ../../ && npm run debug --group overlays",
"debug:firefox": "cd ../../ && npm run debug:firefox --group overlays",
"debug:webkit": "cd ../../ && npm run debug:webkit --group overlays",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group overlays"
"test": "cd ../../ && npm run test:browser --group overlays"
},
"sideEffects": [
"./docs/demo-overlay-system.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group pagination",
"debug:firefox": "cd ../../ && yarn debug:firefox --group pagination",
"debug:webkit": "cd ../../ && yarn debug:webkit --group pagination",
"debug": "cd ../../ && npm run debug --group pagination",
"debug:firefox": "cd ../../ && npm run debug:firefox --group pagination",
"debug:webkit": "cd ../../ && npm run debug:webkit --group pagination",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group pagination"
"test": "cd ../../ && npm run test:browser --group pagination"
},
"sideEffects": [
"lion-pagination.js"

View file

@ -21,11 +21,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group progress-indicator",
"debug:firefox": "cd ../../ && yarn debug:firefox --group progress-indicator",
"debug:webkit": "cd ../../ && yarn debug:webkit --group progress-indicator",
"debug": "cd ../../ && npm run debug --group progress-indicator",
"debug:firefox": "cd ../../ && npm run debug:firefox --group progress-indicator",
"debug:webkit": "cd ../../ && npm run debug:webkit --group progress-indicator",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group progress-indicator"
"test": "cd ../../ && npm run test:browser --group progress-indicator"
},
"sideEffects": [
"lion-progress-indicator.js"

View file

@ -14,7 +14,7 @@ application.
## Run
Start the dashboard via `yarn dashboard` to automatically open the browser and start the dashboard.
Start the dashboard via `npm run dashboard` to automatically open the browser and start the dashboard.
## Interface

View file

@ -24,7 +24,7 @@
"providence": "node --max-old-space-size=8192 ./src/cli/index.js",
"test:node": "mocha './test-node/**/*.test.js'",
"test:node:e2e": "mocha './test-node/program/**/*.e2e.js' --timeout 60000",
"test:node:watch": "yarn test:node --watch"
"test:node:watch": "npm run test:node --watch"
},
"dependencies": {
"@babel/core": "^7.10.1",

View file

@ -468,7 +468,7 @@ class InputDataService {
* Gives back all monorepo package paths
*/
static getMonoRepoPackages(rootPath) {
// [1] Look for yarn workspaces
// [1] Look for npm/yarn workspaces
const pkgJson = getPackageJson(rootPath);
if (pkgJson && pkgJson.workspaces) {
return getPathsFromGlobList(pkgJson.workspaces, rootPath);

View file

@ -9,4 +9,4 @@ Whenever new Analyzers are added, please make sure the needed ingredients for a
end to end test are added to one of the above projects (or both).
Be sure to update 'test-helpers/project-mocks-analyzer-output'.
This can be done by running `yarn test:node:e2e --generate-e2e-mode` once.
This can be done by running `npm run test:node:e2e --generate-e2e-mode` once.

View file

@ -66,7 +66,7 @@ describe('InputDataService', () => {
it('"getReferenceProjectPaths"', async () => {});
describe('"getMonoRepoPackages"', async () => {
it('supports yarn workspaces', async () => {
it('supports npm/yarn workspaces', async () => {
mockProject({
'./package.json': JSON.stringify({
workspaces: ['packages/*', 'another-folder/another-package'],

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group radio-group",
"debug:firefox": "cd ../../ && yarn debug:firefox --group radio-group",
"debug:webkit": "cd ../../ && yarn debug:webkit --group radio-group",
"debug": "cd ../../ && npm run debug --group radio-group",
"debug:firefox": "cd ../../ && npm run debug:firefox --group radio-group",
"debug:webkit": "cd ../../ && npm run debug:webkit --group radio-group",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group radio-group"
"test": "cd ../../ && npm run test:browser --group radio-group"
},
"sideEffects": [
"lion-radio.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group select-rich",
"debug:firefox": "cd ../../ && yarn debug:firefox --group select-rich",
"debug:webkit": "cd ../../ && yarn debug:webkit --group select-rich",
"debug": "cd ../../ && npm run debug --group select-rich",
"debug:firefox": "cd ../../ && npm run debug:firefox --group select-rich",
"debug:webkit": "cd ../../ && npm run debug:webkit --group select-rich",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group select-rich"
"test": "cd ../../ && npm run test:browser --group select-rich"
},
"sideEffects": [
"lion-select-invoker.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group select",
"debug:firefox": "cd ../../ && yarn debug:firefox --group select",
"debug:webkit": "cd ../../ && yarn debug:webkit --group select",
"debug": "cd ../../ && npm run debug --group select",
"debug:firefox": "cd ../../ && npm run debug:firefox --group select",
"debug:webkit": "cd ../../ && npm run debug:webkit --group select",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group select"
"test": "cd ../../ && npm run test:browser --group select"
},
"sideEffects": [
"lion-select.js"

View file

@ -27,8 +27,8 @@
"start:fail": "es-dev-server -c demo/fail/server.js",
"start:singleton": "es-dev-server -c demo/singleton/server.js",
"start:singleton-complex": "es-dev-server -c demo/singleton-complex/server.js",
"test": "cd ../../ && yarn test:browser --grep \"packages/singleton-manager/test/**/*.test.js\"",
"test:watch": "cd ../../ && yarn test:browser:watch --grep \"packages/singleton-manager/test/**/*.test.js\""
"test": "cd ../../ && npm run test:browser --grep \"packages/singleton-manager/test/**/*.test.js\"",
"test:watch": "cd ../../ && npm run test:browser:watch --grep \"packages/singleton-manager/test/**/*.test.js\""
},
"sideEffects": false,
"keywords": [

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group steps",
"debug:firefox": "cd ../../ && yarn debug:firefox --group steps",
"debug:webkit": "cd ../../ && yarn debug:webkit --group steps",
"debug": "cd ../../ && npm run debug --group steps",
"debug:firefox": "cd ../../ && npm run debug:firefox --group steps",
"debug:webkit": "cd ../../ && npm run debug:webkit --group steps",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group steps"
"test": "cd ../../ && npm run test:browser --group steps"
},
"sideEffects": [
"lion-step.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group switch",
"debug:firefox": "cd ../../ && yarn debug:firefox --group switch",
"debug:webkit": "cd ../../ && yarn debug:webkit --group switch",
"debug": "cd ../../ && npm run debug --group switch",
"debug:firefox": "cd ../../ && npm run debug:firefox --group switch",
"debug:webkit": "cd ../../ && npm run debug:webkit --group switch",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group switch"
"test": "cd ../../ && npm run test:browser --group switch"
},
"sideEffects": [
"lion-switch.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group tabs",
"debug:firefox": "cd ../../ && yarn debug:firefox --group tabs",
"debug:webkit": "cd ../../ && yarn debug:webkit --group tabs",
"debug": "cd ../../ && npm run debug --group tabs",
"debug:firefox": "cd ../../ && npm run debug:firefox --group tabs",
"debug:webkit": "cd ../../ && npm run debug:webkit --group tabs",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group tabs"
"test": "cd ../../ && npm run test:browser --group tabs"
},
"sideEffects": [
"lion-tabs.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group textarea",
"debug:firefox": "cd ../../ && yarn debug:firefox --group textarea",
"debug:webkit": "cd ../../ && yarn debug:webkit --group textarea",
"debug": "cd ../../ && npm run debug --group textarea",
"debug:firefox": "cd ../../ && npm run debug:firefox --group textarea",
"debug:webkit": "cd ../../ && npm run debug:webkit --group textarea",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group textarea"
"test": "cd ../../ && npm run test:browser --group textarea"
},
"sideEffects": [
"lion-textarea.js"

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group tooltip",
"debug:firefox": "cd ../../ && yarn debug:firefox --group tooltip",
"debug:webkit": "cd ../../ && yarn debug:webkit --group tooltip",
"debug": "cd ../../ && npm run debug --group tooltip",
"debug:firefox": "cd ../../ && npm run debug:firefox --group tooltip",
"debug:webkit": "cd ../../ && npm run debug:webkit --group tooltip",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group tooltip"
"test": "cd ../../ && npm run test:browser --group tooltip"
},
"sideEffects": [
"lion-tooltip.js",

View file

@ -23,11 +23,11 @@
"types"
],
"scripts": {
"debug": "cd ../../ && yarn debug --group validate-messages",
"debug:firefox": "cd ../../ && yarn debug:firefox --group validate-messages",
"debug:webkit": "cd ../../ && yarn debug:webkit --group validate-messages",
"debug": "cd ../../ && npm run debug --group validate-messages",
"debug:firefox": "cd ../../ && npm run debug:firefox --group validate-messages",
"debug:webkit": "cd ../../ && npm run debug:webkit --group validate-messages",
"prepublishOnly": "../../scripts/npm-prepublish.js",
"test": "cd ../../ && yarn test:browser --group validate-messages"
"test": "cd ../../ && npm run test:browser --group validate-messages"
},
"dependencies": {
"@lion/core": "0.13.2",

View file

@ -0,0 +1,10 @@
const fs = require('fs');
const path = require('path');
const packageLockPath = './package-lock.json';
const data = fs.readFileSync(path.resolve(packageLockPath), 'utf8');
if (data.match(/artifactory/g)) {
throw new Error(
'Artifactory references in your package-lock.json! Please make sure you are using a public npm registry when downloading your dependencies!',
);
}

View file

@ -33,7 +33,7 @@ const packagesWithScript = [...findPackagesWithScript(packagesDir)];
const commands = packagesWithScript.map(pkgPath => ({
name: basename(pkgPath),
command: `cd ${pkgPath} && yarn ${script}`,
command: `cd ${pkgPath} && npm run ${script}`,
}));
concurrently(commands, { maxProcesses: 5 })

View file

@ -1,10 +0,0 @@
const fs = require('fs');
const path = require('path');
const yarnLockPath = './yarn.lock';
const data = fs.readFileSync(path.resolve(yarnLockPath), 'utf8');
if (data.match(/artifactory/g)) {
throw new Error(
'Artifactory references in your yarn.lock! Please make sure you are using the official yarn or npm registry when downloading your dependencies!',
);
}

13071
yarn.lock

File diff suppressed because it is too large Load diff