Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce environment for code examples (#7588)
* - Move the wrappers: i. @handsontable/angular ii. @handsontable/react iii. @handsontable/vue to the './wrappers/' subdirectory, - Configure npm workspaces for the wrappers, - Add a link to the root directory under './packages/handsontable', because of an issue with generating 'package-lock.json', - Add scripts for: i. running commands on specific projects ii. running commands for all projects iii. recognizing the context for running tests only for specific projects - Add the config for Codesandbox CI,� - Update some of the dependencies, to be compatible with npm@7's auto-installing peerDependencies, - Modify and/or create issue templates, PR templates and other content, - Update urls to the wrappers in READMEs, - Add (and temporarily disable) new eslint options. (#7380) * - Update the CONTRIBUTING file. - Modify the packages' dependencies to fix npm audit errors. #7380 * Clean up the helper scripts. #7380 * Update package-lock #7380 * - Add a version-bumping script - Add a first version of the release-scheduling script (will be extended with bundle verification etc) #7380 * [WIP] - add some dependency adjustment, needed after introducing the monorepo, - rearrange and refactor the helper scripts, - add a build verification script, - add a cleaning script, - add a "freeze" script, - update the versioning script. * [WIP] - Unify the typescript version across the packages�. - Clean up some of the unused dependencies. - Bump some versions to be compatible with the typescript version. - Bump the angular version to 9 (along with some of the dependencies) in the angular wrapper + disable Ivy for compatibility. * [WIP] - Add npm scripts for freezing, releasing and publishing + unify their naming between the packages. - Rename the scripts from camelCase to kebab-case. - Modify the freezing script with the commit/push functionality, along with some fixes. - Add a release script. - Modify the angular wrapper's version static to make it work with older TS versions, after changing its' dependency from Angular 8 to Angular 9. - Modify the GH actions config to use Node 15 instead of 12. * Add project aliases to the 'delegate-command' script. * Add a script for aliasing the symlinks for the internal packages in node_modules. * - Update the 'eslint-plugin-import' package (will need to be updated in the future) - Remove the wrapper entries from the codesandbox config (temporarily) - Add a safenet to the release script to prevent accidental release pushes to master (the --push argument) - Add a script to re-link local packages in node_modules (needed after the modularization merge) - Add a eslint-disabling comment to one of the files (bug in the eslint-plugin-import package) * Update the node_modules link swapping script. * - Make the linter script run the lint command to all packages (if the script exists). - Simplify some scripts. - Add the changelog entry. - Correct the codesandbox ci script, to (temporarily) build only handsontable. * - Rearrange the package.json structure for better readability. - Add a forced handsontable build in the targeted test script. - Add an error message in the node_modules linking script. * - Move the link-swapping script to postbuild:es. - Refresh package-lock. - Fix the delegate-command script. * - Rewrite the scripts to esm and rearrange their structure, - Add 'semver' package - Utilize 'execa' package - Modify the 'repository' entries in the wrappers package.jsons * Post-CR updates * Change the Node version to 15 in the changelog script. * Set the node version of Codesandbox CI to 14. * - Extend the test-targeting script with pipeline handling. - Extend the run-all script with an exclude option. - Clean up ther scripts. * Fix a problem with the run-all script. * - Switch to rimraf.sync in the node_modules cleaning script - Minor fixes in the monorepo scripts * Fix a potential error with react and vue builds. * Add a .nvmrc file. * Apply suggestions from code review Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> * Update wrappers/angular-handsontable/README.md Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> * Rewrite the `prepare-package-for-publish` script to mjs. * Apply suggestions from code review Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> * change: move code-snippets repo to HOT repo + modify code a bit in scripts/code-examples to run in new environment * change: add http-server dev dep * change: install http-server in code examples from root node_modules * change: add new script to install deps in examples * change: use Node 15 on CI * change: remove redundant files * change: address the comments on GH #7515 (comment) #7515 (comment) #7515 (comment) * Modify the package-linking script. * change: clean up old files and update angular template hot version * change: delete yarn.lock #7515 (comment) * change: update templates README - #7515 (comment) - #7515 (comment) - #7515 (comment) - #7515 (comment) * change: refactor installing deps in examples Get rid of removing node_modules and test config script * change: update package.json to "next" version * change: typo - #7515 (comment) * - Remove all 'require's from the scripts in favor of '--experimental-json-modules'. - Get rid of callbacks in the execa helper in favor of promises. - Clean up some code. * change: add GH Action env variable - #7515 (comment) * - Add missing flags to the package.json scripts. - Apple post-CR suggestions. * Apply suggestions from code review Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> * Update wrappers/angular-handsontable/package.json Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> * Update scripts/verify-bundles.mjs Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> * Update scripts/verify-bundles.mjs Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> * change: add shared package.json content - #7515 (comment) * change: remove from gitignore - #7515 (comment) * change: correct homepage * change: add "license" to package.json * Add missing async/await syntax to the release script. * change: add template's README - #7515 (comment) * change: package.json version to 0.0.0 Since "next" doesn't follow semantic versioning * - Add a temporary flag to the eslint task, to prevent the error on not finding the 'mjs' files in the 'scripts' directory. (to be fixed in a future task). - Update the package-lock. * Modify the 'run-all' script with the yargs array parser. * change: switch from "snippets" to "examples" in README * - Modify the eslint rules for importing in the scripts directory. - Modify the targeted tests script. * change + refactor: refactor scritps and add post build script to rename prod directory * change: remove redundant angular files * Correct the targeted testing script. * - Force the targeting script to build all versions of handsontable (as there's no way to know what other projects might want to import). - Move the symlink creation to postbuild. * change: refactor, remove redundant assets etc * change: remove dist before build * change: simplify test script * fix lint * Update package.json #7515 (comment) Co-authored-by: Jan Siegel <jansiegel@users.noreply.github.com> * Update scripts/code-examples.js Co-authored-by: Jan Siegel <jansiegel@users.noreply.github.com> * change: fix typos - #7515 (comment) - #7515 (comment) - #7515 (comment) - #7515 (comment) - #7515 (comment) * refactor: change to .mjs - #7515 (comment) * change: console color - #7515 (comment) * refactor: use 'execa' - related to the comment #7515 (comment) * refactor: add more spacings Related to the comment: - #7515 (comment) * remove redundant import * remove files * - Add a 'examples' workspace to manage the framework-related example workspaces. - Add framework-related workspaces to manage the framework-based examples. - Modify some of the examples settings to install properly in the monorepo context. - Modify the code snippet scripts and the root-level monorepo scripts. * Modify the way examples load css files, so that it works both locally and on codesandbox. * Remove a redundant css import from one of the vue examples. * Update the examples' package.json and update with a fresh package-lock. * Rebuild package-lock. * - Set a more specific node version in nvmrc. - Extend the examples' README.md with information about the sub-workspaces and examples' building. - Downgrade the vue examples to prevent issues with peerDependency installation on older npm version. * Fix the parcel version in the vanilla examples to 1.12.3, due to a problem with babel in the later version. * Link "live" dependencies only for the "next" directory in the examples. * Correct the previous commit. * - Rewrite the examples symlinking script to not symlink the live directories to the 'next' example package. - Correct the angular examples package symlinking mechanism. * Update examples/README.md #7588 (comment) Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * change: update README Adress all comments about README from PR discussion #7588 (review) * change: push examples build to develop - #7588 (comment) * Update examples/templates/vue/public/index.html Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * Update examples/templates/vue/package.json Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * Update examples/templates/angular/package.json Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * Update examples/templates/angular/src/index.html Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * Update examples/templates/js/index.html Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * Update examples/templates/react/public/index.html Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * Update examples/templates/react/public/index.html Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * change: run tests in examples dist folder wuth only one http-server instance - #7588 (comment) * change: update README with new testing flow * fix: correct kill http-server after finish tests * change: add missing licenKey to React template * change: remove React.StrictMode * fix: tests failed on CI * npm install * try fix CI testing * fix testing on CI * refactor: replace console logs * change: remove `npm run test` mentions in each code example template * change: remove <noscript> from vue examples * refactor: flatten component structure * npm install * update README * change: add more logs Because removing node_modules in each example last very long thus this command looks like it's frozen * change: add LICENSE.txt file to all code examples * Update examples/templates/README.md Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com> * change: extend vue build size limit * change: disable angular build warnings * change + refactor: flatten structure and change styles in Vue template See comment #7588 (review) * change: add new Vue code example and update templates/ README * change: change Angular template and make new Angular basic example * change: modify JS template and make new JS code example * change: modify React template and create new React example * refactor: change the way of renaming production folder name * change: move code examples script to examples/ directory and close process after tests are finished * change: add passing tests to examples and fix CI testing URL * npm i * change: use `javascript` formatting to remove red background from GH which indicates error * refactor: quotes * refactor: rename `npm run jasmine` script * Update README.md * change: run examples install in examples/ directory Before that change, the script `npm run examples:install <version>` was running `npm run install:version <version>` inside the examples/<version> directory, which doesn't have package.json. Thus the script was running from the parent directory package.json in examples/ directory implicitly. Now the script `npm run install:version <version>` is run in the examples/ directory. * change: use async rimraf The rimraf hadn't been removing `node_modules` from the frameworks directory. As async, it works as expected. * change: correct rimraf usage * Update examples/scripts/code-examples.mjs #7588 (comment) Co-authored-by: Jan Siegel <jansiegel@users.noreply.github.com> * Update examples/scripts/clean-subpackages.mjs #7588 (comment) Co-authored-by: Jan Siegel <jansiegel@users.noreply.github.com> * Update examples/package.json #7588 (comment) Co-authored-by: Jan Siegel <jansiegel@users.noreply.github.com> * change: disable npm audit * wip: fix dependency versions * Modify the fixed dependency versions. Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com> Co-authored-by: Oskar Kowalów <kowalow.oskar@gmail.com> Co-authored-by: Oskar Kowalów <33433795+Osky772@users.noreply.github.com> Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
- Loading branch information