Skip to content

WIP: tidy up dependencies #418

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

Closed
wants to merge 11 commits into from
Closed
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
4 changes: 4 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"buildCommand": "build:force",
"packages": [
"packages/react-invariant",
"packages/react-components",
"packages/react-fiber",
"packages/react-modular",
"packages/react",
"packages/animated"
],
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
**/dist/
packages/*/stats.html
.eslintcache
.DS_Store
85,787 changes: 29,118 additions & 56,669 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 2 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
],
"scripts": {
"build": "nx run-many --target=build --all --parallel",
"build:force": "nx run-many --target=build --all --parallel --skip-nx-cache",
"build:docs": "nx run @pixi/react-docs:deploy",
"build:force": "nx run-many --target=build --all --parallel --skip-nx-cache",
"clean": "rimraf packages/*/dist packages/*/build",
"lint": "eslint .",
"prepare": "husky install",
Expand All @@ -32,38 +32,14 @@
"get-pkg-repo": "4.1.1",
"hosted-git-info": "^2.1.4"
},
"dependencies": {
"@babel/runtime": "^7.14.8",
"@pixi/app": "^7.1.1",
"@pixi/constants": "^7.1.1",
"@pixi/core": "^7.1.1",
"@pixi/display": "^7.1.1",
"@pixi/extensions": "^7.1.1",
"@pixi/graphics": "^7.1.1",
"@pixi/math": "^7.1.1",
"@pixi/mesh": "^7.1.1",
"@pixi/mesh-extras": "^7.1.1",
"@pixi/particle-container": "^7.1.1",
"@pixi/sprite": "^7.1.1",
"@pixi/sprite-animated": "^7.1.1",
"@pixi/sprite-tiling": "^7.1.1",
"@pixi/text": "^7.1.1",
"@pixi/text-bitmap": "^7.1.1",
"@pixi/ticker": "^7.1.1",
"@react-spring/animated": "^9.6.1",
"@react-spring/types": "^9.6.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-reconciler": "0.29.0",
"react-spring": "^9.6.1"
},
"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.7",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.14.8",
"@nrwl/nx-cloud": "latest",
"@pixi/eslint-config": "^4.0.1",
"@rollup/plugin-alias": "^4.0.2",
Expand Down
37 changes: 11 additions & 26 deletions packages/animated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"directory": "packages/animated"
},
"license": "MIT",
"sideEffects": false,
"main": "index.js",
"module": "module.js",
"jsnext:main": "module.js",
Expand All @@ -21,17 +22,16 @@
"module.js"
],
"scripts": {
"clean": "rimraf ./dist",
"prebuild": "npm run clean",
"build": "npm run build:dev && npm run build:prod",
"build:dev": "cross-env NODE_ENV=development rollup -c",
"build:prod": "cross-env NODE_ENV=production rollup -c",
"clean": "rimraf ./dist",
"test": "jest --silent",
"test:watch": "jest --watch"
},
"sideEffects": false,
"dependencies": {
"@pixi/react": "^7.0.2"
"@pixi/react": "*"
},
"devDependencies": {
"@pixi/app": "^7.1.1",
Expand All @@ -41,37 +41,22 @@
"@pixi/math": "^7.1.1",
"@pixi/mesh-extras": "^7.1.1",
"@pixi/particle-container": "^7.1.1",
"@pixi/react": "*",
"@pixi/sprite": "^7.1.1",
"@pixi/sprite-animated": "^7.1.1",
"@pixi/sprite-tiling": "^7.1.1",
"@pixi/text": "^7.1.1",
"@pixi/text-bitmap": "^7.1.1",
"@pixi/ticker": "^7.1.1"
"@pixi/ticker": "^7.1.1",
"@react-spring/animated": "^9.0.0",
"@react-spring/types": "^9.6.1",
"react": ">=17.0.0",
"react-dom": ">=17.0.0"
},
"peerDependencies": {
"@babel/runtime": "^7.14.8",
"@pixi/app": ">=7.0.0",
"@pixi/core": ">=7.0.0",
"@pixi/display": ">=7.0.0",
"@pixi/graphics": ">=7.0.0",
"@pixi/math": ">=7.0.0",
"@pixi/mesh-extras": ">=7.0.0",
"@pixi/particle-container": ">=7.0.0",
"@pixi/react": "*",
"@pixi/sprite": ">=7.0.0",
"@pixi/sprite-animated": ">=7.0.0",
"@pixi/sprite-tiling": ">=7.0.0",
"@pixi/text": ">=7.0.0",
"@pixi/text-bitmap": ">=7.0.0",
"@pixi/ticker": ">=7.0.0",
"@react-spring/animated": ">=9.0.0",
"prop-types": "^15.8.1",
"react": ">=17.0.0",
"react-dom": ">=17.0.0",
"react-spring": ">=9.0.0"
"@react-spring/animated": ">=9.0.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "6d5b98bc6d7eafd1b0016e60a725b2b6c9f46a33"
}
Comment on lines -75 to +61
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These get added automatically by lerna during publish: lerna/lerna#1880

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh strange this didn't happen for pixi or assetpack 🙁

}
44 changes: 22 additions & 22 deletions packages/animated/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ import { getRollupConfig, isProductionBuild } from '../../shared/getRollupConfig

const buildType = isProductionBuild() ? '' : '-dev';

const external = [
'@pixi/react',
'@pixi/app',
'@pixi/core',
'@pixi/display',
'@pixi/graphics',
'@pixi/math',
'@pixi/mesh-extras',
'@pixi/text',
'@pixi/text-bitmap',
'@pixi/ticker',
'@pixi/sprite',
'@pixi/sprite-tiling',
'@pixi/sprite-animated',
'@pixi/particle-container',
'@react-spring/animated',
'react',
'react-dom',
'react-spring'
];

const builds = ['cjs', 'es'].map(
(format) => getRollupConfig(
`dist/index.${format}${buildType}.js`,
format,
{
external: [
'@pixi/react',
'@pixi/app',
'@pixi/core',
'@pixi/display',
'@pixi/graphics',
'@pixi/math',
'@pixi/mesh-extras',
'@pixi/text',
'@pixi/text-bitmap',
'@pixi/ticker',
'@pixi/sprite',
'@pixi/sprite-tiling',
'@pixi/sprite-animated',
'@pixi/particle-container',
'@react-spring/animated',
'react',
'react-dom',
'react-spring'
]
}
{ external }
)
);

Expand Down
2 changes: 1 addition & 1 deletion packages/animated/test/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`index export modules for react-spring 1`] = `
exports[`index export modules for react-animated 1`] = `
{
"AnimatedSprite": {
"$$typeof": Symbol(react.forward_ref),
Expand Down
4 changes: 2 additions & 2 deletions packages/animated/test/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as index from '../src/index';
import * as index from '../src';

describe('index', () =>
{
test('export modules for react-spring', () =>
test('export modules for react-animated', () =>
{
expect(index).toMatchSnapshot();
});
Expand Down
37 changes: 19 additions & 18 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@
"name": "@pixi/react-docs",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"deploy": "docusaurus deploy",
"docusaurus": "docusaurus",
"prettify": "prettier --write **/**/*.{md,mdx}",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"start": "docusaurus start",
"swizzle": "docusaurus swizzle",
"write-heading-ids": "docusaurus write-heading-ids",
"prettify": "prettier --write **/**/*.{md,mdx}"
"write-translations": "docusaurus write-translations"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"dependencies": {
"@docusaurus/core": "^2.3.0",
Expand All @@ -20,6 +32,7 @@
"@mdx-js/react": "^1.6.22",
"@pixi/react": "*",
"@pixi/react-animated": "*",
"@react-spring/web": "^9.6.1",
"clsx": "^1.2.1",
"lodash.times": "^4.3.2",
"pixi.js": "^7.1.1",
Expand All @@ -29,18 +42,6 @@
"@docusaurus/module-type-aliases": "^2.3.0",
"prettier": "^2.8.1"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=16.14"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/theme/ReactLiveScope/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import * as PIXI from 'pixi.js';
import * as ReactPixi from '@pixi/react';
import * as ReactPixiAnimated from '@pixi/react-animated';
import { Spring } from 'react-spring';
import { Spring } from '@react-spring/web';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the docs i also used react-spring/web. The internet said this was better?

Copy link
Collaborator

@baseten baseten Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah for sure! That would also likely remove some npm install errors as some of the other react spring packages have old peer deps. We should likely do this everywhere!

import times from 'lodash.times';

import makeAnimatedSpriteTextures from './makeAnimatedSpriteTextures';
Expand Down
Loading