Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0-alpha-1 #358

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: cimg/node:16.15.1
- image: cimg/node:18.16.0

working_directory: ~/react-pixi-fiber

Expand All @@ -12,24 +12,25 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- npm-dependencies-{{ checksum "package.json" }}
- npm-dependencies-{{ checksum ".nvmrc" }}-{{ checksum "package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- npm-dependencies-

- run: yarn install --frozen-lockfile
- run: npm ci

# Cache dependencies
- save_cache:
paths:
- node_modules
key: npm-dependencies-{{ checksum "package.json" }}
key: npm-dependencies-{{ checksum ".nvmrc" }}-{{ checksum "package-lock.json" }}

# run build
- run: yarn build
- run: npm run build

# run tests
- run: yarn test --coverage --ci --silent
- run: yarn test:ts
- run: npm run test --coverage --ci --silent
- run: npm run test:ts

# upload coverage report
- run: yarn codecov
# TODO: Migrate to new uploader
# - run: npm exec codecov
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:react/recommended", "prettier", "prettier/react"],
"extends": ["plugin:react/recommended", "prettier"],
"plugins": ["react", "react-hooks", "prettier"],
"parser": "babel-eslint",
"parserOptions": {
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10
v18.16.0
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Removed
- Removed unstable_batchedUpdates API ([#89])


## [1.0.6] - 2023-01-13

Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ The core team is monitoring for pull requests. We will review your pull request
**Before submitting a pull request**, please make sure the following is done:

1. Fork [the repository](https://github.com/michalochman/react-pixi-fiber) and create your branch from `master`.
2. Run `yarn` in the repository root.
2. Run `npm install` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
5. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
6. Make sure your code lints (`yarn eslint`).
4. Ensure the test suite passes (`npm run test`). Tip: `npm run test --watch TestName` is helpful in development.
5. Format your code with [prettier](https://github.com/prettier/prettier) (`npm run prettier`).
6. Make sure your code lints (`npm run eslint`).

## Style Guide

We use an automatic code formatter called [Prettier](https://prettier.io/). Run `yarn prettier` after making any changes to the code.
We use an automatic code formatter called [Prettier](https://prettier.io/). Run `npm run prettier` after making any changes to the code.

Then, our linter will catch most issues that may exist in your code. You can check the status of your code styling by simply running `yarn eslint`.
Then, our linter will catch most issues that may exist in your code. You can check the status of your code styling by simply running `npm run eslint`.

However, there are still some styles that the linter cannot pick up. If you are unsure about something, looking at [Airbnb's Style Guide](https://github.com/airbnb/javascript) will guide you in the right direction.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ This example will render [`PIXI.Text`] object into a [Root Container] of PIXI Ap

## Running Examples

1. Run `yarn install` (or `npm install`) in the repository root.
2. Run `yarn install` (or `npm install`) in the `examples` directory.
3. Run `yarn start` (or `npm run start`) in the `examples` directory.
1. Run `npm install` in the repository root.
2. Run `npm install` in the `examples` directory.
3. Run `npm run start` in the `examples` directory.
4. Wait few seconds and browse examples that will open in new browser window.


Expand Down
2 changes: 1 addition & 1 deletion examples/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SKIP_PREFLIGHT_CHECK=true

DISABLE_ESLINT_PLUGIN=true
68 changes: 4 additions & 64 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,6 @@ To format our code whenever we make a commit in git, we need to install the foll
npm install --save husky lint-staged prettier
```

Alternatively you may use `yarn`:

```sh
yarn add husky lint-staged prettier
```

* `husky` makes it easy to use githooks as if they are npm scripts.
* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8).
* `prettier` is the JavaScript formatter we will run before commits.
Expand Down Expand Up @@ -354,12 +348,6 @@ The generated project includes React and ReactDOM as dependencies. It also inclu
npm install --save react-router
```

Alternatively you may use `yarn`:

```sh
yarn add react-router
```

This works for any library, not just `react-router`.

## Importing a Component
Expand Down Expand Up @@ -539,12 +527,6 @@ First, let’s install the command-line interface for Sass:
npm install --save node-sass-chokidar
```

Alternatively you may use `yarn`:

```sh
yarn add node-sass-chokidar
```

Then in `package.json`, add the following lines to `scripts`:

```diff
Expand Down Expand Up @@ -584,12 +566,6 @@ As a final step, you may find it convenient to run `watch-css` automatically wit
npm install --save npm-run-all
```

Alternatively you may use `yarn`:

```sh
yarn add npm-run-all
```

Then we can change `start` and `build` scripts to include the CSS preprocessor commands:

```diff
Expand Down Expand Up @@ -750,12 +726,6 @@ Install React Bootstrap and Bootstrap from npm. React Bootstrap does not include
npm install --save react-bootstrap bootstrap@3
```

Alternatively you may use `yarn`:

```sh
yarn add react-bootstrap bootstrap@3
```

Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file:

```js
Expand Down Expand Up @@ -792,12 +762,12 @@ Recent versions of [Flow](http://flowtype.org/) work with Create React App proje

To add Flow to a Create React App project, follow these steps:

1. Run `npm install --save flow-bin` (or `yarn add flow-bin`).
1. Run `npm install --save flow-bin`.
2. Add `"flow": "flow"` to the `scripts` section of your `package.json`.
3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory.
3. Run `npm run flow init` to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory.
4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`).

Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors.
Now you can run `npm run flow` to check the files for type errors.
You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience.
In the future we plan to integrate it into Create React App even more closely.

Expand Down Expand Up @@ -1267,12 +1237,6 @@ If you’d like to test components in isolation from the child components they r
npm install --save enzyme enzyme-adapter-react-16 react-test-renderer
```

Alternatively you may use `yarn`:

```sh
yarn add enzyme enzyme-adapter-react-16 react-test-renderer
```

As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.)

The adapter will also need to be configured in your [global setup file](#initializing-test-environment):
Expand Down Expand Up @@ -1331,12 +1295,6 @@ To enable this, install `jest-enzyme`:
npm install --save jest-enzyme
```

Alternatively you may use `yarn`:

```sh
yarn add jest-enzyme
```

Import it in [`src/setupTests.js`](#initializing-test-environment) to make its matchers available in every test:

```js
Expand Down Expand Up @@ -1580,12 +1538,6 @@ First, install Styleguidist:
npm install --save react-styleguidist
```

Alternatively you may use `yarn`:

```sh
yarn add react-styleguidist
```

Then, add these scripts to your `package.json`:

```diff
Expand Down Expand Up @@ -1727,12 +1679,6 @@ To add Source map explorer to a Create React App project, follow these steps:
npm install --save source-map-explorer
```

Alternatively you may use `yarn`:

```sh
yarn add source-map-explorer
```

Then in `package.json`, add the following line to `scripts`:

```diff
Expand Down Expand Up @@ -1967,12 +1913,6 @@ To publish it at [https://myusername.github.io/my-app](https://myusername.github
npm install --save gh-pages
```

Alternatively you may use `yarn`:

```sh
yarn add gh-pages
```

Add the following scripts in your `package.json`:

```diff
Expand Down Expand Up @@ -2149,7 +2089,7 @@ If none of these solutions help please leave a comment [in this thread](https://

If you run `npm test` and the console gets stuck after printing `react-scripts test --env=jsdom` to the console there might be a problem with your [Watchman](https://facebook.github.io/watchman/) installation as described in [facebookincubator/create-react-app#713](https://github.com/facebookincubator/create-react-app/issues/713).

We recommend deleting `node_modules` in your project and running `npm install` (or `yarn` if you use it) first. If it doesn't help, you can try one of the numerous workarounds mentioned in these issues:
We recommend deleting `node_modules` in your project and running `npm install` first. If it doesn't help, you can try one of the numerous workarounds mentioned in these issues:

* [facebook/jest#1767](https://github.com/facebook/jest/issues/1767)
* [facebook/watchman#358](https://github.com/facebook/watchman/issues/358)
Expand Down
17 changes: 17 additions & 0 deletions examples/link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

echo "Removing react-pixi-fiber from node_modules"
rm -rf node_modules/react-pixi-fiber && \
echo "- ok"

echo "Injecting local react-pixi-fiber into node_modules"
mkdir -p node_modules/react-pixi-fiber && \
cp -R ../index.js node_modules/react-pixi-fiber/ && \
cp -R ../cjs node_modules/react-pixi-fiber/ && \
cp ../package.json node_modules/react-pixi-fiber/ && \
echo "- ok"

echo "Invalidate node_modules cache"
rm -rf node_modules/.cache && \
echo "- ok"

Loading