Skip to content

Commit 6005aa1

Browse files
author
Shreve (emdashcodes)
authored
Fix package references so everything builds cleanly after the package update (#42)
1 parent 0aa2b51 commit 6005aa1

File tree

15 files changed

+386
-357
lines changed

15 files changed

+386
-357
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The WordPress Feature API is a system for exposing WordPress functionality in a
1414

1515
This project is structured as a monorepo using npm workspaces:
1616

17-
- **`packages/client`**: The core client-side SDK (`@wp-feature-api/client`). Provides the API (`registerFeature`, `executeFeature`, `Feature` type) for interacting with the feature registry on the frontend and manages the underlying data store. Third-party plugins can use this to register their own client-side features.
17+
- **`packages/client`**: The core client-side SDK (`@automattic/wp-feature-api`). Provides the API (`registerFeature`, `executeFeature`, `Feature` type) for interacting with the feature registry on the frontend and manages the underlying data store. Third-party plugins can use this to register their own client-side features.
1818
- **`packages/client-features`**: A library containing implementations of standard client-side features (e.g., block insertion, navigation). It depends on the client SDK and is used by the main plugin to register the core features.
1919
- **`demo/wp-feature-api-agent`**: A demo WordPress plugin showcasing how to use the Feature API, including registering features, and implementing WP Features as tools in Typescript based AI Agent.
2020
- **`src/`**: Contains the main JavaScript entry point (`src/index.js`) for the core WordPress plugin. This script initializes the client SDK and registers the core client features when the plugin is active.

demo/wp-feature-api-agent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"author": "Automattic",
2525
"license": "GPL-2.0-or-later",
2626
"dependencies": {
27-
"@wp-feature-api/client": "1.0.0",
27+
"@automattic/wp-feature-api": "*",
2828
"@wordpress/api-fetch": "^6.55.0",
2929
"@wordpress/components": "^25.16.0",
3030
"@wordpress/data": "^10.22.0",

demo/wp-feature-api-agent/src/agent/wp-feature-tool-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
getRegisteredFeatures,
66
executeFeature,
77
type Feature,
8-
} from '@wp-feature-api/client';
8+
} from '@automattic/wp-feature-api';
99

1010
/**
1111
* Internal dependencies
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
5+
/**
6+
* External dependencies
7+
*/
8+
const path = require( 'path' );
9+
10+
module.exports = {
11+
...defaultConfig,
12+
resolve: {
13+
...defaultConfig.resolve,
14+
alias: {
15+
...defaultConfig.resolve?.alias,
16+
'@automattic/wp-feature-api': path.resolve(
17+
__dirname,
18+
'../../packages/client/src'
19+
),
20+
},
21+
},
22+
};

docs/for-ai.md

Lines changed: 339 additions & 333 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@wordpress/i18n": "^4.58.0",
5252
"@wordpress/plugins": "^7.22.0",
5353
"@wordpress/icons": "^10.22.0",
54-
"@wp-feature-api/client": "^1.0.0",
5554
"@wp-feature-api/client-features": "^1.0.0",
5655
"node-fetch": "^3.3.2"
5756
},

packages/client-features/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"clean": "rm -rf build build-types tsconfig.tsbuildinfo"
1111
},
1212
"dependencies": {
13-
"@wp-feature-api/client": "^1.0.0",
13+
"@automattic/wp-feature-api": "*",
1414
"@wordpress/api-fetch": "^6.55.0",
1515
"@wordpress/block-editor": "^14.16.0",
1616
"@wordpress/blocks": "^14.10.0",

packages/client-features/src/blocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { dispatch } from '@wordpress/data';
99
/**
1010
* External dependencies
1111
*/
12-
import type { Feature } from '@wp-feature-api/client';
12+
import type { Feature } from '@automattic/wp-feature-api';
1313

1414
/**
1515
* Internal dependencies

packages/client-features/src/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { select, dispatch } from '@wordpress/data';
88
/**
99
* External dependencies
1010
*/
11-
import type { Feature } from '@wp-feature-api/client';
11+
import type { Feature } from '@automattic/wp-feature-api';
1212

1313
/**
1414
* Internal dependencies

packages/client-features/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
/**
2020
* External dependencies
2121
*/
22-
import { registerFeature } from '@wp-feature-api/client';
22+
import { registerFeature } from '@automattic/wp-feature-api';
2323

2424
export const coreFeatures = [
2525
// Navigation

packages/client-features/src/navigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n';
66
/**
77
* External dependencies
88
*/
9-
import type { Feature } from '@wp-feature-api/client';
9+
import type { Feature } from '@automattic/wp-feature-api';
1010

1111
/**
1212
* Client-side feature for browser navigation.

packages/client-features/src/patterns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { dispatch } from '@wordpress/data';
99
/**
1010
* External dependencies
1111
*/
12-
import type { Feature } from '@wp-feature-api/client';
12+
import type { Feature } from '@automattic/wp-feature-api';
1313

1414
/**
1515
* Internal dependencies

packages/client-features/webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ module.exports = {
2525
...defaultConfig.resolve,
2626
alias: {
2727
...defaultConfig.resolve?.alias,
28-
'@wp-feature-api/client': path.resolve( __dirname, '../client' ),
28+
'@automattic/wp-feature-api': path.resolve(
29+
__dirname,
30+
'../client'
31+
),
2932
},
3033
},
3134
externals: {

webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ module.exports = {
1111
...defaultConfig,
1212
externals: {
1313
...defaultConfig.externals,
14-
'@automattic/wp-feature-api': 'wp.features',
1514
},
1615
plugins: [
1716
...defaultConfig.plugins.filter(

0 commit comments

Comments
 (0)