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

chore(strapi): upgraded strapi support for v5 #108

Open
wants to merge 1 commit 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
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Node v14
uses: actions/setup-node@v2
- name: Install Node v20
uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install Yarn
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Node v14
uses: actions/setup-node@v2
- name: Install Node v20
uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install Yarn
Expand Down
141 changes: 135 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,138 @@
# Don't check auto-generated stuff into git
coverage
node_modules
stats.json
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

############################
# OS X
############################

# Cruft
.DS_Store
npm-debug.log
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*


############################
# Linux
############################

*~


############################
# Windows
############################

Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp


############################
# Packages
############################

*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid


############################
# Logs and databases
############################

.tmp
*.log
*.sql
*.sqlite
*.sqlite3


############################
# Misc.
############################

*#
ssl
.idea
nbproject
.tsbuildinfo
.eslintcache
.env


############################
# Strapi
############################

public/uploads/*
!public/uploads/.gitkeep


############################
# Build
############################

dist
build


############################
# Node.js
############################

lib-cov
lcov.info
pids
logs
results
node_modules
.node_history


############################
# Package managers
############################

.yarn/*
!.yarn/cache
!.yarn/unplugged
!.yarn/patches
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
yarn-error.log


############################
# Tests
############################

coverage
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
41 changes: 34 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"$schema": "https://json.schemastore.org/package",
"name": "strapi-plugin-transformer",
"version": "3.1.2",
"version": "4.0.0-dev.1",
"description": "A plugin for Strapi Headless CMS that provides the ability to transform the API request and/or response.",
"scripts": {
"build": "strapi-plugin build",
"verify": "strapi-plugin verify",
"watch": "strapi-plugin watch",
"watch:link": "strapi-plugin watch:link",
"lint": "eslint . --fix",
"format": "prettier --write **/*.{ts,js,json,yml}",
"test": "jest"
Expand All @@ -18,6 +22,12 @@
"url": "https://github.com/ComfortablyCoding"
}
],
"contributors": [
{
"name": "John Mitchell-Grant",
"url": "https://github.com/johnmgrant"
}
],
"homepage": "https://github.com/ComfortablyCoding/strapi-plugin-transformer#readme",
"repository": {
"type": "git",
Expand All @@ -26,19 +36,36 @@
"bugs": {
"url": "https://github.com/ComfortablyCoding/strapi-plugin-transformer/issues"
},
"dependencies": {},
"type": "commonjs",
"exports": {
"./package.json": "./package.json",
"./strapi-server": {
"source": "./server/src/index.js",
"import": "./dist/server/index.mjs",
"require": "./dist/server/index.js",
"default": "./dist/server/index.js"
}
},
"files": [
"dist"
],
"devDependencies": {
"@strapi/sdk-plugin": "^5.2.6",
"@strapi/strapi": "^5.0.2",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^26.1.1",
"eslint-plugin-node": "^11.1.0",
"jest": "^27.5.1",
"prettier": "^2.5.1"
"lodash": "^4.17.21",
"prettier": "^3.3.3",
"yup": "^1.4.0"
},
"peerDependencies": {
"@strapi/strapi": "^4.0.7",
"@strapi/sdk-plugin": "^5.2.6",
"@strapi/strapi": "^5.0.2",
"lodash": "^4.17.21",
"yup": "^0.32.9"
"yup": "^1.4.0"
},
"strapi": {
"displayName": "Transformer",
Expand All @@ -47,8 +74,8 @@
"kind": "plugin"
},
"engines": {
"node": ">=14.19.1 <=20.x.x",
"npm": ">=6.0.0"
"node": ">=18.0.0 <=20.x.x",
"npm": ">=8.0.0"
},
"keywords": [
"strapi",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion server/util/pluginId.js → server/src/util/pluginId.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const pluginPkg = require('../../package.json');
const pluginPkg = require('../../../package.json');

/**
* Returns the plugin id
Expand Down
3 changes: 0 additions & 3 deletions strapi-server.js

This file was deleted.

Loading