Skip to content

Commit

Permalink
feat(pkg): rescope package names
Browse files Browse the repository at this point in the history
  • Loading branch information
crherman7 committed Dec 31, 2024
1 parent 9224afe commit d2b4604
Show file tree
Hide file tree
Showing 25 changed files with 107 additions and 58 deletions.
2 changes: 1 addition & 1 deletion apps/expo/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = api => {

return {
presets: [['babel-preset-expo', {enableBabelRuntime: !isRechunk}]],
plugins: [['@crherman7/rechunk-babel-plugin']],
plugins: [['@rechunk/babel-plugin']],
};
};
2 changes: 1 addition & 1 deletion apps/expo/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const {cacheVersion} = require('@crherman7/rechunk-babel-plugin');
const {cacheVersion} = require('@rechunk/babel-plugin');
const {getDefaultConfig} = require('expo/metro-config');

const root = path.resolve(__dirname, '../..');
Expand Down
8 changes: 4 additions & 4 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"web": "expo start --web"
},
"dependencies": {
"@crherman7/rechunk": "workspace:*",
"@crherman7/rechunk-api-client": "workspace:*",
"@rechunk/api-client": "workspace:*",
"@rechunk/core": "workspace:*",
"expo": "~52.0.20",
"expo-linear-gradient": "^14.0.1",
"expo-status-bar": "~2.0.0",
Expand All @@ -32,8 +32,8 @@
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@crherman7/rechunk-babel-plugin": "workspace:*",
"@crherman7/rechunk-cli": "workspace:*",
"@rechunk/babel-plugin": "workspace:*",
"@rechunk/cli": "workspace:*",
"@repo/eslint-config": "workspace:*",
"@repo/prettier-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-native/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = api => {
},
},
],
['@crherman7/rechunk-babel-plugin'],
['@rechunk/babel-plugin'],
],
};
};
2 changes: 1 addition & 1 deletion apps/react-native/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const {cacheVersion} = require('@crherman7/rechunk-babel-plugin');
const {cacheVersion} = require('@rechunk/babel-plugin');
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');

const root = path.resolve(__dirname, '../..');
Expand Down
8 changes: 4 additions & 4 deletions apps/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"start:offline": "RECHUNK_ENVIRONMENT=offline react-native start"
},
"dependencies": {
"@crherman7/rechunk": "workspace:*",
"@crherman7/rechunk-api-client": "workspace:*",
"@rechunk/api-client": "workspace:*",
"@rechunk/core": "workspace:*",
"react": "18.3.1",
"react-error-boundary": "4.0.13",
"react-native": "0.76.5",
Expand All @@ -30,14 +30,14 @@
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.2",
"@babel/runtime": "^7.25.2",
"@crherman7/rechunk-babel-plugin": "workspace:*",
"@crherman7/rechunk-cli": "workspace:*",
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.76.5",
"@react-native/eslint-config": "0.76.5",
"@react-native/metro-config": "0.76.5",
"@rechunk/babel-plugin": "workspace:*",
"@rechunk/cli": "workspace:*",
"@repo/eslint-config": "workspace:*",
"@repo/prettier-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"rechunk.podspec"
],
"scripts": {
"build": "pnpm --filter '@repo/*' --filter '@crherman7/*' recursive run --sort build",
"build": "pnpm --filter '@repo/*' --filter '@rechunk/*' recursive run --sort build",
"prepare": "husky",
"release": "pnpm --filter '@crherman7/*' recursive run --sort release --ci",
"release": "pnpm --filter '@rechunk/*' recursive run --sort release --ci",
"release:dry-run": "pnpm release --dry-run",
"release:major": "pnpm release --increment major",
"release:minor": "pnpm release --increment minor",
Expand Down
4 changes: 2 additions & 2 deletions packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@crherman7/rechunk-api-client",
"version": "2.0.0-rc.12",
"name": "@rechunk/api-client",
"version": "0.0.0",
"description": "",
"keywords": [],
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@crherman7/rechunk-babel-plugin",
"version": "2.0.0-rc.12",
"name": "@rechunk/babel-plugin",
"version": "0.0.0",
"description": "",
"keywords": [],
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ const NODE_PROCESS_ENV_IDENTIFIER = 'env';
* Cache key used to store and retrieve the content of the `.rechunkrc.json` file.
* This key is used in conjunction with a caching mechanism to avoid re-reading the file.
*/
const RECHUNK_CONFIG_KEY = '@crherman7+rechunk+config+json';
const RECHUNK_CONFIG_KEY = '@rechunk+config+json';

/**
* Cache key used to store and retrieve the content of the `package.json` file.
* This key is used in conjunction with a caching mechanism to avoid re-reading the file.
*/
const RECHUNK_PACKAGE_KEY = '@crherman7+rechunk+package+json';
const RECHUNK_PACKAGE_KEY = '@rechunk+package+json';

/**
* An array of dependencies that should be considered as extra dependencies for the project.
Expand Down Expand Up @@ -303,15 +303,15 @@ export default function (
// Create template with declaration first
const rechunkComponentTemplate = `
import React from 'react';
import {importChunk} from '@crherman7/rechunk';
import {importChunk} from '@rechunk/core';
const $$ReChunkModule = React.lazy(() => importChunk('${base64String}'));
export default $$ReChunkModule;
`;

const rechunkFunctionTemplate = `
import { importChunk } from '@crherman7/rechunk';
import { importChunk } from '@rechunk/core';
const chunkLoader = importChunk('${base64String}');
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@crherman7/rechunk-cli",
"version": "2.0.0-rc.12",
"name": "@rechunk/cli",
"version": "0.0.0",
"description": "",
"keywords": [],
"license": "MIT",
Expand All @@ -17,8 +17,8 @@
"dependencies": {
"@babel/parser": "^7.26.3",
"@babel/traverse": "^7.26.4",
"@crherman7/rechunk-api-client": "workspace:*",
"@crherman7/rechunk-rollup-preset": "workspace:*",
"@rechunk/api-client": "workspace:*",
"@rechunk/rollup-preset": "workspace:*",
"chalk": "^4.0.0",
"commander": "^12.0.0",
"glob": "^11.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmds/dev-server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import withRechunk from '@crherman7/rechunk-rollup-preset';
import withRechunk from '@rechunk/rollup-preset';
import chalk from 'chalk';
import {program} from 'commander';
import {createHash} from 'crypto';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmds/init.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Project} from '@crherman7/rechunk-api-client';
import {Project} from '@rechunk/api-client';
import chalk from 'chalk';
import {program} from 'commander';
import fs from 'fs';
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/cmds/manage.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {Token} from '@rechunk/api-client';
import {program} from 'commander';
import open from 'open';

import {
configureReChunkApi,
constructAuthTokenURL,
getRechunkConfig,
LOGO,
constructAuthTokenURL,
} from '../lib';
import {Token} from '@crherman7/rechunk-api-client';

/**
* Registers the `manage` command to the CLI.
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmds/publish.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import withRechunk from '@crherman7/rechunk-rollup-preset';
import withRechunk from '@rechunk/rollup-preset';
import chalk from 'chalk';
import {program} from 'commander';
import inquirer from 'inquirer';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Configuration as ReChunkApiConfiguration,
DefaultApi as ReChunkApi,
} from '@crherman7/rechunk-api-client';
} from '@rechunk/api-client';
import fs from 'fs';
import path from 'path';

Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@crherman7/rechunk",
"version": "2.0.0-rc.12",
"name": "@rechunk/core",
"version": "0.0.0",
"description": "",
"keywords": [],
"license": "MIT",
Expand All @@ -12,7 +12,7 @@
"release": "release-it"
},
"dependencies": {
"@crherman7/rechunk-api-client": "workspace:*",
"@rechunk/api-client": "workspace:*",
"base-64": "^1.0.0",
"jsrsasign": "^11.1.0",
"tiny-emitter": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/ChunkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Chunk,
Configuration as ReChunkApiConfiguration,
DefaultApi as ReChunkApi,
} from '@crherman7/rechunk-api-client';
} from '@rechunk/api-client';
import React from 'react';
import {TinyEmitter} from 'tiny-emitter';
import invariant from 'tiny-invariant';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Chunk} from '@crherman7/rechunk-api-client';
import {Chunk} from '@rechunk/api-client';

/**
* Represents the valid entries for chunks in the `importChunk` function.
Expand Down
24 changes: 24 additions & 0 deletions packages/metro-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "@rechunk/metro-config",
"version": "0.0.0",
"description": "",
"keywords": [],
"license": "MIT",
"author": "Chris Herman",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsup",
"release": "release-it"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"@types/babel__core": "^7.20.5",
"release-it": "^17.6.0",
"typescript": "^5.4.3"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
}
}
Empty file.
3 changes: 3 additions & 0 deletions packages/metro-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@repo/typescript-config/common-js.json"
}
7 changes: 7 additions & 0 deletions packages/metro-config/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {defineConfig} from 'tsup';

export default defineConfig({
dts: true,
clean: true,
entry: ['src/index.ts'],
});
4 changes: 2 additions & 2 deletions packages/rollup-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@crherman7/rechunk-rollup-preset",
"version": "2.0.0-rc.12",
"name": "@rechunk/rollup-preset",
"version": "0.0.0",
"description": "",
"keywords": [],
"license": "MIT",
Expand Down
Loading

0 comments on commit d2b4604

Please sign in to comment.