Skip to content

Commit

Permalink
Merge branch 'release/8.11.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
marteinn committed May 19, 2023
2 parents 93994dd + 91ff905 commit 3e72b74
Show file tree
Hide file tree
Showing 45 changed files with 33,942 additions and 61,836 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## Added
## Changed
## Fixed
## Removed

## [8.11.0] - 2023-05-19

### Added
- Add Wagtail 5.0 support (@marteinn)
- Add Django 4.2 support (@marteinn)

### Changed
- Make paths/imports better reflect scaffolder in Working with Wagtails routable pages (@DBonbon )
- Upgrade next to 13.4.3 (@marteinn)
- Upgrade storybook to v7 (@marteinn)

### Fixed
- Replace deprecated STATICFILES_STORAGE setting with STORAGES (@marteinn)
- Only set Next.js preview cookies on /preview
- Fix issue with geodjango deps not being properly installed on CI (@ludwi)
- Drop deprecated postgresql_user priv in favor of postgresql_user in provision
- Activate postgis postgresql extension in provision
- Add sv_SE.utf8 collate when creating database in provision
- Upgrade psycopg2 to 2.9.6
- Upgrade sentry_sdk to 1.23.1
- Upgrade djangorestframework-stubs to 3.14.0
- Upgrade prettier to 2.8.8
- Upgrade @sentry/nextjs to 7.51.1
- Upgrade @swc/core to 1.3.59
- Upgrade eslint to 8.40.0
- Upgrade css-loader to 6.7.4
- Upgrade style-loader to 3.3.3
- Upgrade @swc/jest to 0.2.26
- Upgrade eslint-config-prettier to 8.8.0
- Upgrade jest-junit to 16.0.0
- Upgrade i18next to 22.5.0
- Upgrade react-i18next to 12.3.1
- Upgrade @types/react to 18.2.6

### Removed
- Drop automatic SVG to component, instead use inline components (@marteinn)

## [8.10.0] - 2023-03-11

Expand Down
3 changes: 2 additions & 1 deletion Company-Project/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
- run:
name: Install additional geodjango deps
command: |
sudo apt-get update
sudo apt-get install -y libproj-dev gdal-bin
- run:
name: Make sure black has been applied to .py files
Expand Down Expand Up @@ -229,4 +230,4 @@ workflows:
requires:
- frontend
- django

16 changes: 15 additions & 1 deletion Company-Project/deploy/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,27 @@
- name: Creates postgres database
postgresql_db:
name: "{{ database_name }}"
lc_collate: sv_SE.utf8
lc_ctype: sv_SE.utf8
template: template0

- name: Creates postgres user
postgresql_user:
db: "{{ database_name }}"
name: "{{ database_user }}"
password: "{{ database_password }}"
priv: ALL

- name: Associate postgres user to database
postgresql_privs:
db: "{{ database_name }}"
privs: ALL
type: database
role: "{{ database_user }}"

- name: Adds postgis extension
postgresql_ext:
name: postgis
db: "{{ database_name }}"

- name: Creates uWSGI config
template:
Expand Down
45 changes: 6 additions & 39 deletions Company-Project/frontend/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
const path = require('path');

module.exports = {
staticDirs: ['../public'],
stories: [
'../stories/**/*.stories.js',
'../components/**/*.stories.js',
'../containers/**/*.stories.js',
],
core: {
builder: 'webpack5',
},
babel: async (options) => {
options.presets = ['next/babel'];
return {
Expand All @@ -20,43 +15,15 @@ module.exports = {
'@storybook/addon-viewport',
'@storybook/addon-a11y',
'@storybook/addon-backgrounds',
{
name: 'storybook-addon-next',
options: {
nextConfigPath: path.resolve(__dirname, '../next.config.js'),
},
},
],
features: {
babelModeV7: true,
},
webpackFinal: (config) => {
/**
* Fixes issue with `next-i18next` and is ready for webpack@5
* @see https://github.com/isaachinman/next-i18next/issues/1012#issuecomment-792697008
* @see https://github.com/storybookjs/storybook/issues/4082#issuecomment-758272734
* @see https://webpack.js.org/migrate/5/
*/
const imageRule = config.module.rules.find((rule) =>
rule.test.test('.svg')
);
imageRule.exclude = /\.svg$/;

// add your rule as normal
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});

config.resolve.fallback = {
fs: false,
tls: false,
net: false,
module: false,
path: require.resolve('path-browserify'),
crypto: false,
};

return config;
docs: {
autodocs: true,
},
framework: {
name: '@storybook/nextjs',
options: {},
},
};
9 changes: 7 additions & 2 deletions Company-Project/frontend/components/Hero/Hero.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import React from 'react';
import PropTypes from 'prop-types';
import s from './Hero.module.css';
import Logo from '../../public/img/logo.svg';
import logo from '../../public/img/logo.svg';

const Hero = ({ title }) => (
<div className={s.Container}>
<Logo className={s.Logo} />
<img
className={s.Logo}
src={logo.src}
width={logo.width}
heigh={logo.height}
/>
<h1 className={s.Title}>
<img
src={'/img/white_circle.png'}
Expand Down
15 changes: 1 addition & 14 deletions Company-Project/frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ let nextConfig = {
i18n,
};

const withSvgr = (nextConfig = {}) => {
return Object.assign({}, nextConfig, {
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
});
return config;
},
});
};

const SentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
Expand All @@ -44,7 +31,7 @@ const SentryWebpackPluginOptions = {
// });

module.exports = () => {
const plugins = [withSvgr];
const plugins = [];
return plugins.reduce((acc, plugin) => plugin(acc), {
...nextConfig,
});
Expand Down
Loading

0 comments on commit 3e72b74

Please sign in to comment.