Skip to content

Commit

Permalink
Workspaces (#769)
Browse files Browse the repository at this point in the history
* workspaces wip

test works
.
.
.
.
.

* .

* esm, no decorators, vite

* todo! fullySpecified

* sandbox-simple

* vite

* sandbox simple

* sandbox

* lint fix

* .

* todo: move webpack & babel to root
.
.

* antd wip

* good lint

* utils

* deps split
.

* mui

* add react to dev deps

* material

* bootstrap

* 6.0.0

* .
.
.

* 1

* split core to core & ui

* ,

* .

* remove fullySpecified: false and type: module

* .

* VanillaWidgets
.

* readme

* .

* .

* fixes for hoist

* pnpm works ?

* pnpm ready

* .

* for yarn v1

* Revert "for yarn v1"

This reverts commit 61f46e8.

* for npm 7

* fix pushd

* fix build sh

* workspace:*

* no yarn build

* pnpm

* .

* .

* .

* .

* .

* .

* --access public

* fix immutable has no default

* 6.0.0-beta.1

* gitignore

* 6.0.0-beta.2

* immutable 4

* beta3

* sass

* Revert "immutable 4"

This reverts commit 3e219f1.

* Revert "fix immutable has no default"

This reverts commit 161b3fd.

* important fix

* dirs cjs, esm, styles -> css
.
.

* .

* beta4

* .

* styles!

* .

* .

* .

* css split a bit

* beta5

* .

* pnpm/action-setup
.

* readme

* pnpm-lock.yaml

* artifacts

* smoko, del gpr

* gh-pages

* .

* .

* .

* test!

* .

* .

* .

* test

* .

* .

* .

* .

* csb

* .

* .

* .

* .

* port

* Revert "test!"

This reverts commit 70f0cad.

* .

* tags

* v6.0.0
  • Loading branch information
ukrbublik authored Dec 28, 2022
1 parent 0e9506f commit 6f4d746
Show file tree
Hide file tree
Showing 384 changed files with 17,860 additions and 2,776 deletions.
31 changes: 0 additions & 31 deletions .babelrc

This file was deleted.

46 changes: 24 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,60 @@ orbs:
jobs:
test:
docker:
- image: cimg/node:12.22-browsers
- image: cimg/node:14.20-browsers
steps:
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
name: Install pnpm
command: npm install --global pnpm
- run:
name: Check install
command: |
google-chrome --version
chromedriver --version
node --version
npm --version
pnpm --version
- checkout
# - restore_cache:
# keys:
# - node-deps-v1-{{ arch }}-{{checksum "package.json"}}-{{checksum "examples/package.json"}}-{{checksum "sandbox/package.json"}}-{{checksum "sandbox_simple/package.json"}}
# - node-deps-v1-{{ arch }}-{{checksum "package.json"}}
- restore_cache:
name: Restore pnpm Package Cache
keys:
- pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
- run:
name: Install
command: npm run install-all
# - save_cache:
# key: node-deps-v1-{{ arch }}-{{checksum "package.json"}}-{{checksum "examples/package.json"}}-{{checksum "sandbox/package.json"}}-{{checksum "sandbox_simple/package.json"}}
# paths:
# - node_modules
# - examples/node_modules
# - sandbox/node_modules
# - sandbox_simple/node_modules
command: pnpm i
- save_cache:
name: Save pnpm Package Cache
key: pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
paths:
- node_modules
- run:
name: Lint
command: npm run lint
command: pnpm lint
- run:
name: Test
command: npm run test
command: pnpm test
- store_test_results:
path: ./junit
path: ./packages/tests/junit
- store_artifacts:
path: ./junit
path: ./packages/tests/junit
destination: junit
- store_artifacts:
path: ./coverage/lcov
path: ./packages/tests/coverage/lcov
destination: lcov
- store_artifacts:
path: ./coverage/html
path: ./packages/tests/coverage/html
destination: coverage
- run:
name: Build
command: npm run build-all
command: pnpm build
- store_artifacts:
path: ./examples/build
path: ./packages/examples/build
destination: examples
- run:
name: Hot
command: npm run check-hot
command: pnpm check-hot

workflows:
smoke:
Expand Down
4 changes: 2 additions & 2 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ version = 1
test_patterns = ["tests/**"]

exclude_patterns = [
"sandbox_simple/**",
"sandbox/**",
"packages/sandbox/**",
"packages/sandbox_simple/**",
"scripts/**"
]

Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
build
dist
ts_out
106 changes: 64 additions & 42 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ module.exports = {
"env": {
"browser": true,
"es6": true,
"mocha": true,
"jest": true,
"node": true
},
"ignorePatterns": [
"**/ts_out/*",
"**/build/*",
"**/scripts/*",
"**/dist/*",
"**/node_modules/*",
"bundle.js",
Expand All @@ -19,54 +18,59 @@ module.exports = {
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
// "plugin:import/typescript", // not needed for JS
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
// "plugin:@typescript-eslint/eslint-recommended", // not needed for JS
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 11,
"ecmaFeatures": {
"legacyDecorators": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react",
"babel",
"import",
"@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 11,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module",
"project": "tsconfig.json", // resolves dynamically for each package
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"webpack": {
"config": "./webpack.config.js"
}
},
"import/extensions": [
".js",
".jsx",
".ts",
".tsx"
".js", ".jsx",
// ".ts", ".tsx"
],
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
".ts", ".tsx"
],
},
"import/resolver": {
// order matters, so push "node" to end as fallback
"typescript": {
// "alwaysTryTypes": true,
"project": "packages/*/tsconfig.json",
},
"node": true,
},
"import/core-modules": [
"react-awesome-query-builder/lib/css/styles.css"
]
// "@react-awesome-query-builder/ui/css/styles.scss",
"react" // for import `react` in `core/modules/index.d.ts`
],
"import/ignore": [
/\.(scss|less|css)$/
],
"import/internal-regex": /^@react-awesome-query-builder/
},
"parser": "@typescript-eslint/parser",
"rules": {
"indent": [
"error",
Expand Down Expand Up @@ -123,33 +127,51 @@ module.exports = {
"prefer-const": [
//todo: set to warn
"off", {}
],
"import/no-named-as-default-member": [
"off", {}
]
},
"overrides": [
{
"files": ["modules/**/*.ts", "modules/**/*.tsx"],
"parserOptions": {
"project": 'tsconfig.json',
"files": ["packages/tests/**/*"],
"env": {
"mocha": true,
"jasmine": true,
},
},
{
"files": ["examples/**/*.ts", "examples/**/*.tsx"],
"parserOptions": {
"project": 'examples/tsconfig.json',
"settings": {
"import/core-modules": [
"sinon",
"chai"
],
// "import/resolver": {
// "webpack": {
// "config": "./webpack.config.js"
// }
// },
},
},
{
"files": ["sandbox/**/*.ts", "sandbox/**/*.tsx"],
"files": ["packages/sandbox_simple/**/*"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"project": 'sandbox/tsconfig.json',
"requireConfigFile": false,
"babelOptions": {
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
},
"sourceType": "module",
},
},
{
"files": ["tests/**/*.ts", "tests/**/*.tsx"],
"parserOptions": {
"project": 'tests/tsconfig.json',
"settings": {
"import/core-modules": [
"react",
"@react-awesome-query-builder/ui/css/styles.css"
],
},
},

{
"files": ["**/*.ts", "**/*.tsx"],
"extends": [
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/codecov-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 14
- run: npm i
#cache: 'pnpm'
- run: pnpm i
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- run: npm test
- uses: codecov/codecov-action@v1
- run: pnpm test
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/tests/coverage/
61 changes: 29 additions & 32 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,34 @@ on:
workflow_dispatch:

jobs:
page_build:
name: Update GitHub pages
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
ref: master
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm install
- name: Build examples
run: npm run build-examples
- name: Copy build
run: |
rm -rf /tmp/react-awesome-query-builder
mkdir /tmp/react-awesome-query-builder
mkdir /tmp/react-awesome-query-builder/gh-pages
cp ./examples/build/*bundle* /tmp/react-awesome-query-builder/gh-pages/
- uses: actions/checkout@v1
with:
ref: gh-pages
- name: Commit build
run: |
cp -R /tmp/react-awesome-query-builder/gh-pages/* .
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add ./*bundle*
git commit -m "update to ${GITHUB_SHA}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 14
#cache: 'pnpm'
- name: Install packages
run: pnpm i
- name: Setup
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Build
run: pnpm build
- name: Copy build
run: |
rm -rf /tmp/gh-pages
mkdir /tmp/gh-pages
cp ./packages/examples/build/* /tmp/gh-pages/
mkdir /tmp/gh-pages/sandbox
cp -r ./packages/sandbox/dist/* /tmp/gh-pages/sandbox/
mkdir /tmp/gh-pages/sandbox_simple
cp -r ./packages/sandbox_simple/dist/* /tmp/gh-pages/sandbox_simple/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /tmp/gh-pages/
Loading

0 comments on commit 6f4d746

Please sign in to comment.